This page has content that is only applicable to Self-Hosted deployments.
- an AES key file that contains a random character string
- a PFX (PKCS#12) certificate file with optional password protection
Understanding Data Encryption Keys and Master Keys
Encryption uses a key to convert plaintext into ciphertext. When you first begin using , the application generates a random data encryption key (DEK). This key is not stored in plaintext and is used to encrypt all sensitive data. A master key, also known as a key encryption key (KEK), does not encrypt data directly. Instead, it encrypts the DEK. This approach allows to protect sensitive data while enabling key rotation without requiring all stored data to be re-encrypted.Defining a Custom Master Key
You can define a custom master key in by configuring encryption properties. Configure these settings in in either the sync.properties file configuration file or as environment variables.- If you are using a PFX certificate that requires a password, set the
cdata.encryption.key.passwordproperty in sync.properties. - If you are using an AES key file, you can supply the key path in the sync.properties file or by using the
APP_KEYenvironment variable.
Changing the Master Key
You can change the master key file, if necessary. uses the currently configured key for all encryption operations. To change the master key:- Stop the service and ensure that the new key file is securely stored and backed up.
-
Use one of the following commands to update the master key without disrupting operations:
-
To change the master key to a new key file:
-
To change the master key if it is a PFX file that requires a password:
-
To change the master key to a new key file:
- Restart to apply the changes.