Encrypting the Database Connection Password¶
By default the database password is supplied in clear text through the -Dconnection.password Java Option. QIE can instead accept an encrypted value so the password is not stored in clear text in the startup arguments.
Generate an encryption key¶
Encryption uses a 32-byte (256-bit) key supplied through the QIE_DB_PASS_ENCRYPTION_KEY environment variable. Set this variable in the environment where QIE runs, before QIE starts:
Warning
The value must be exactly 32 bytes. Store it securely and back it up. The encrypted password can only be decrypted with the same key. If the key is lost the password must be re-encrypted with a new key.
Encrypt the password¶
-
In the QIE console, open the System Configuration page.
-
Click Encrypt Password to open the QIE Database Connection Password Encryption Utility.
-
Enter the clear-text database password and encrypt it. The utility returns an encrypted value prefixed with
ENCQIE:.
Note
The utility uses the QIE_DB_PASS_ENCRYPTION_KEY value configured for the QIE instance you are signed in to, so the encrypted value is only valid for an instance configured with that same key.
Configure QIE to use the encrypted password¶
Replace the clear-text value of -Dconnection.password with the encrypted value, including the ENCQIE: prefix:
At startup QIE detects the ENCQIE: prefix, decrypts the value with QIE_DB_PASS_ENCRYPTION_KEY, and connects with the resulting password. A value without the prefix continues to be treated as a clear-text password.
If the ENCQIE: prefix is present but QIE_DB_PASS_ENCRYPTION_KEY is not set, its value does not match the key used to encrypt the password, or the encrypted value itself is malformed (for example, truncated or mis-copied), QIE aborts startup with an error describing the specific problem.
Warning
Any clear-text password that itself begins with the literal text ENCQIE: is treated as an encrypted value and fails to decrypt. Do not use a database password that starts with ENCQIE:.