All credentials stored in the Gazebo vault are encrypted at rest using AES-256-GCM before being written to the database.
Algorithm
AES-256-GCM (Advanced Encryption Standard, 256-bit key, Galois/Counter Mode)
- 256-bit key — the maximum AES key size
- GCM mode — provides both encryption and authentication (AEAD)
- Each credential is encrypted with a unique 96-bit random nonce — no two encryptions produce the same ciphertext even for identical plaintext
Encryption key
The vault encryption key (VAULT_ENCRYPTION_KEY) is:
- A 256-bit secret stored as an environment variable, separate from the database
- Never written to the database
- Never logged
- Required to decrypt any vault credential
Critical: the encryption key must never change after initial setup. Rotating the key invalidates every stored credential — they become permanently unrecoverable without the original key. This is documented in the deployment configuration and enforced by operational policy.
What is encrypted
| Data | Encrypted |
|---|---|
| API keys | Yes — ciphertext + nonce stored in vault_credentials |
| OAuth access tokens | Yes |
| OAuth refresh tokens | Yes |
| Service names (e.g. "stripe") | No — used for access policy lookup |
| Agent names | No |
| Audit log entries | No — logged in plaintext; contain service names and outcomes but not credential values |
Credential values never appear in logs, error messages, or API responses to web clients.
Decryption path
Credentials are decrypted only in one context: fulfilling an authorized get_credential call. The decryption happens server-side; the plaintext value is returned directly to the calling agent over TLS and is never cached or stored in the response path.