Skip to content

Seal Key

gpsu encrypts the secrets in its database with the seal key. A copy of the database is useless without that key.

Encrypted secretSet in
Each server’s iDRAC passwordServers
Notification target URLsNotifications
The identity provider’s client secretSign-In and the API
Each authenticator app’s keySecond 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
VariableFlagReads the key from
GPSU_SEAL_KEY_FILE--seal-key-fileA file that holds the key
GPSU_SEAL_KEY_VAULT--seal-key-vaultA key in Vault, such as gpsu/seal#key

The key needs at least 32 random characters. Make one with:

openssl rand -base64 48

Warning

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-key

Restart 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:

SecretEnter it again with
A server’s iDRAC passwordgpsu server edit r730xd --password or Settings › Servers
A notification target URLSettings › Notifications
The identity provider’s client secretSettings › Sign-in or gpsu provider set