Monopam encrypts stored credentials, secrets, access keys and encrypted settings with a key you provide. Every Monopam process that uses the same database (Web, gateways and their proxies) must have the same key, or credentials cannot be decrypted and connections, reveals and rotations fail.
|
Applies to |
Who can do this |
|---|---|
|
Monopam v2026.10 |
Platform operators. |
Settings
|
Environment variable |
Meaning |
Default |
|---|---|---|
|
|
The active key. New data is encrypted with it. |
None: a built-in key is used and a warning is logged. |
|
|
Version number of the active key (1 or higher). |
|
|
|
Older keys kept for decryption, as |
None |
If the active key is lost, data encrypted with it cannot be recovered. Store the key in your secret store with a backup. The key is read at process start; restart every process after changing it.
Set the key for the first time
-
Generate a random key, for example
openssl rand -base64 48, and store it safely. -
Set
MONOPAM_VAULT_KEYandMONOPAM_VAULT_KEY_VERSION=1for the application containers and for every gateway host (on Windows as machine-level environment variables), then restart them. -
Check the key status as a super administrator:
GET /api/vaultmaintenance/key-statusshould return"isExternallyKeyed": trueand the expectedactiveKeyVersion. -
Open an RDP or SSH session to confirm the gateway can decrypt credentials.
-
Re-encrypt existing data once per tenant:
POST /api/vaultmaintenance/reencrypt, then followGET /api/vaultmaintenance/reencrypt/<jobId>until it finishes withTotalFailed = 0.
Rotate the key
-
Generate a new key.
-
On every target, set
MONOPAM_VAULT_KEYto the new key,MONOPAM_VAULT_KEY_VERSION=2andMONOPAM_VAULT_KEYS=1:<old key>. -
Restart all processes and confirm
activeKeyVersionis 2. -
Run the re-encryption job and confirm
TotalFailed = 0. -
Remove the old key from
MONOPAM_VAULT_KEYSand restart again.
To roll back before re-encryption finishes, keep both keys in the key ring and switch the active version back.
Checklist
-
Key generated and stored in a secret store.
-
Same key and version on the application and every gateway host.
-
All processes restarted.
-
Key status shows the external key and the right version.
-
An RDP or SSH test connection works.
-
Re-encryption finished with no failures in every tenant.
Troubleshooting
|
What you see |
Why |
What to do |
|---|---|---|
|
Vault key version ... is not configured in a gateway log. |
That host lacks the key or has a different version. |
Give it the same key and version and restart it. No data is lost. |
|
Re-encryption reports failures. |
The key was not distributed to all processes, or the wrong key was used. |
Check the logs; rows that cannot be decrypted are left untouched. |
Related
-
Recovery objectives (RTO and RPO)
-
Manage gateways
-
System settings