apps/docs/content/concepts/architecture/secrets.mdx
In this chapter you can find information of how ZITADEL processes and stores secrets and credentials in a secure fashion.
<Callout> We use the terms secret and credentials interchangeable to keep this guide lean. </Callout>ZITADEL uses the following principles when handling Secrets across their lifecycle:
By default ZITADEL stores secrets from its users, applications as well as its generated secrets like signing keys in the database. To protect the secrets against extraction from database as well as database dumps they are encrypted with AES256.
<Callout> The key used to encrypt and decrypt the secrets in the ZITADEL database is called `masterkey` and needs to be exactly 32 bytes long. The only secrets stored outside of the Secrets Storage are the masterkey, the TLS Keys, the initial Admin User (including the password) </Callout>ZITADEL does handle many different public keys. These include:
ZITADEL does handle many different passwords and secrets. These include:
Passwords and secrets are always hashed with a random salt and stored as an encoded string that contains the Algorithm, its Parameters, Salt and Hash. The storage encoding used by ZITADEL is Modular Crypt Format and a full reference can be found in our Passwap library.
The following hash algorithms are supported:
Note however that by default, only bcrypt is enabled.
Further Verifiers must be enabled in the settings by the system administrator.
</Callout>
Some secrets cannot be hashed because they need to be used in their raw form. These include:
Since the Masterkey is used as means of protecting the Secrets Storage it cannot be stored in the storage. You find here the many ways how ZITADEL can consume the Masterkey.
ZITADEL does support end to end TLS as such it can consume TLS Key Material. Please check our TLS Modes documentation for more details.
The initial Admin User of ZITADEL can be configured through ZITADELs config options.
<Callout> To prevent elevated breaches ZITADEL forces the Admin Users password to be changed during the first login. </Callout>