Security with HashiCorp Vault is mostly correct, boring defaults applied consistently. Here is the short list that removes most of the risk.
Safe defaults
- Auto-unseal with a cloud KMS and tightly control unseal keys
- Rotate static secrets and encryption keys on a schedule
Wire it into the pipeline
Pull a secret in CI with the Vault CLI (auth via OIDC/JWT).
- run: |
export VAULT_TOKEN=$(vault write -field=token auth/jwt/login role=ci jwt=$CI_JOB_JWT)
export DB_PASS=$(vault kv get -field=password secret/app/db)Reinforcing habits
- Use auth methods (Kubernetes, OIDC, AppRole) with least-privilege policies
- Prefer dynamic secrets with short TTLs over static ones
- Enable audit devices and monitor them
Want senior help putting HashiCorp Vault to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.