Seal Key
gpsu encrypts the secrets in its database with the seal key. A copy of the database is useless without that key.
| Encrypted secret | Set in |
|---|---|
| Each server’s iDRAC password | Servers |
| Notification target URLs | Notifications |
| The identity provider’s client secret | Sign-In and the API |
| Each authenticator app’s key | Second factors |
Without a seal key:
- server passwords must come from Vault
- the identity provider’s client secret must come from Vault
- admins can’t add or change notification targets
- no account can add an authenticator app, and gpsu asks no one to add one
Caution
An account that has an authenticator app can’t sign in while the seal key is missing. gpsu can’t check its codes without the key.
Set the key
GPSU_SEAL_KEY_FILE=/run/secrets/gpsu-seal-key gpsu serve| Variable | Flag | Reads the key from |
|---|---|---|
GPSU_SEAL_KEY_FILE | --seal-key-file | A file that holds the key |
GPSU_SEAL_KEY_VAULT | --seal-key-vault | A key in Vault, such as gpsu/seal#key |
The key needs at least 32 random characters. Make one with:
openssl rand -base64 48Warning
Keep the key apart from the database and its backups. Anyone with both can decrypt every secret.
Rotate the key
Add the new key
Point GPSU_SEAL_KEY_FILE or GPSU_SEAL_KEY_VAULT at the new key.
Keep the old key as a previous key
Add the old key to GPSU_SEAL_PREVIOUS_KEY_FILES or GPSU_SEAL_PREVIOUS_KEY_VAULT. Both take a comma-separated list:
GPSU_SEAL_KEY_FILE=/run/secrets/gpsu-seal-key-2
GPSU_SEAL_PREVIOUS_KEY_FILES=/run/secrets/gpsu-seal-keyRestart gpsu
At startup, gpsu encrypts each secret again with the new key.
After the restart, you can remove the previous key. Backups made before the rotation still need it to restore passwords.
Lost keys
gpsu can’t decrypt a secret whose key is gone. Enter that secret again where you first set it:
| Secret | Enter it again with |
|---|---|
| A server’s iDRAC password | gpsu server edit r730xd --password or Settings › Servers |
| A notification target URL | Settings › Notifications |
| The identity provider’s client secret | Settings › Sign-in or gpsu provider set |