Architecture · All ADRs
ADR 0010 — Envelope encryption with pluggable KMS
Architecture decision record — status: Accepted.
Status: Accepted
Decision#
Every secret version gets a fresh 256-bit DEK; plaintext is sealed with AES-256-GCM; the DEK is wrapped by a KMS provider (local, AWS KMS, GCP KMS, Azure Key Vault). The encryption context {orgId, secretId, version} is bound as AAD on both layers, so ciphertext copied to another row fails to decrypt (tested). KEK rotation re-wraps DEKs without re-encrypting data. Fingerprints (HMAC with a server key) enable leak detection without holding plaintext.
Consequences#
Database compromise alone yields no secrets. Cloud KMS providers are implemented against the official SDKs; live verification requires cloud accounts and is tracked as BLOCKED until they are provided.