Filters
How to search
  • Plain words find names, texts and examples.
  • "two words" finds the exact phrase.
  • --name or -x finds an option.
  • #word looks only inside commands.
  • @grep finds lessons and labs that use grep.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Put ! before a word to leave it out. OR between words means one of them.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search

DevSecOps & cloud securityVisual series

Secrets management: Vault vs cloud KMS vs SOPS

A service needs a database password. Three teams answer with three tools, and the argument is usually about taste rather than trust boundaries.

Quick reference

VaultCloud KMSSOPS
What it storesAny secret or keyKeys, not secretsEncrypted files
EncryptionBarrier, AES-256-GCMHSM-backed CMKAge, PGP or KMS
Access modelToken and policyIAM policyKey holder only
AuditAudit devicesCloudTrailGit diffs
RotationLeases and rotationAnnual or manualRe-encrypt files
Best forDynamic secretsCloud-native keysGitOps secrets

How to pick

  • Vault → dynamic secrets, leases, run it yourself.
  • KMS → keys stay in the HSM; you keep the envelope.
  • SOPS → encrypted files in git, decrypted at deploy.

Explained

What each one is

Vault stores secrets and hands them out with a lease. A cloud KMS stores keys and never gives the key material back; you call it to encrypt or decrypt. SOPS encrypts a file so the ciphertext can live in git.

The six rows

Storage: Vault holds any secret or key, KMS holds keys, SOPS holds encrypted files. Encryption: Vault uses an AES-256-GCM barrier, KMS uses an HSM-backed key, SOPS uses age, PGP or a cloud KMS. Access: Vault checks a token and policy, KMS checks IAM, SOPS trusts the key holder. Audit: Vault writes to audit devices, KMS to CloudTrail, SOPS to the git diff. Rotation: Vault has leases and rotation, KMS rotates yearly or manually, SOPS re-encrypts. Fit: Vault for dynamic secrets, KMS for cloud keys, SOPS for GitOps.

How to choose

Start from where the secret is used. If it is a database credential that should expire, you want leases. If it is a key that must never leave a boundary, you want KMS. If it is a config file that must ship with the app, SOPS is enough.

The honest caveat: SOPS moves the problem to the key holder. If the age key sits next to the repository, the encryption is decoration.

The lesson: pick the trust boundary first, then the tool that fits it.

In one line

The key is the boundary. Three tools, three different trust boundaries.

Check the key

aws kms describe-key --key-id $ID

More notes: DevSecOps & cloud security

Open in the notes app: search, filters, copy This note on GitHub