Interview Prep/DevSecOps/Secrets Management and Identity

How do Kubernetes workloads authenticate to Vault?

AdvancedConceptSecrets Management and Identity
Answer

With the Kubernetes auth method. The pod presents its projected ServiceAccount JWT; Vault validates it via the TokenReview API (or JWKS in newer setups) and maps the ServiceAccount name and namespace to a Vault role, which carries policies and a TTL.

vault write auth/kubernetes/role/app \
  bound_service_account_names=app bound_service_account_namespaces=prod \
  policies=app-read ttl=15m

Delivery to the pod is via Vault Agent injector, the Secrets Store CSI driver, or Vault Secrets Operator.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Secrets Management and Identity