Sachin Chaurasiya

Protect · Secrets management

HashiCorp Vault

Vault stores and brokers secrets, issues dynamic database and cloud credentials, manages PKI and encrypts data as a service. Kubernetes workloads authenticate with service account tokens instead of static secrets.

Stage
Protect
Category
Secrets management
Documentation
Official docs
License
BUSL-1.1 (OpenBao: MPL-2.0)
On this page

What it does

Provides authenticated, audited access to secrets through engines: KV, dynamic database credentials, PKI, transit encryption and cloud IAM.

Where it fits

Protect stage: the source of truth for secrets consumed by CI (via OIDC/JWT auth) and by workloads (Vault Agent, CSI driver or External Secrets Operator).

Quick start

vault login -method=oidc
vault kv put secret/payments/api db_password=...     # prefer dynamic secrets over static KV
vault read database/creds/payments-readonly          # short-lived DB credential
vault write auth/kubernetes/role/payments-api bound_service_account_names=api bound_service_account_namespaces=payments policies=payments ttl=1h

Common pitfalls

  • Treating Vault as a KV store only; dynamic secrets are the actual win.
  • Root token left enabled after initialisation.
  • No audit device configured — you cannot answer “who read this secret?”.

On this site

  • Secrets and Configuration Security: Vault in dev mode with a scoped policy, a token with a TTL and a use limit, and the audit device showing who read which path with values HMAC-ed.

Articles about HashiCorp Vault