This guide covers rotation of DATA_ENCRYPTION_SECRET used for encrypted DNS provider config.
DATA_ENCRYPTION_SECRETis the active encryption key.DATA_ENCRYPTION_LEGACY_SECRETSis a comma-separated list of previous keys used only for decryption fallback.- New writes always use the active key.
- Generate a new strong active key.
- Move the old active key into
DATA_ENCRYPTION_LEGACY_SECRETS. - Deploy config with both keys present.
- Run status:
GET /api/v1/security/rotation/status
- Run re-encrypt:
- dry run:
POST /api/v1/security/rotation/data-key/reencrypt?dry_run=true - execute:
POST /api/v1/security/rotation/data-key/reencrypt
- dry run:
- Verify
reencrypt_candidatesis zero. - Remove legacy keys and redeploy.
- All rotation actions are audit-logged.
- If
decrypt_failuresis non-zero, resolve those providers before removing legacy keys.