# HashiCorp Vault

> A central secrets platform with identity-based auth, dynamic credentials, encryption as a service and detailed audit logs. Free notes, key concepts, resources...

Canonical: https://www.internhack.in/roadmaps/tracks/devops/vault
Last updated: 2026-11-28

A central secrets platform with identity-based auth, dynamic credentials, encryption as a service and detailed audit logs.

Advanced · about 7 hours · difficulty 4/5

Learn first: [Secrets Management Fundamentals](https://www.internhack.in/roadmaps/tracks/devops/secrets-management)

**Vault** (and its open-source fork **OpenBao**) goes beyond storing key-value pairs: it issues credentials on demand, encrypts data for applications and records every access.

### Core concepts

- **Seal and unseal**: Vault starts sealed; its master key is split (Shamir) or held by a cloud KMS (**auto-unseal**).
- **Auth methods** prove identity: Kubernetes service accounts, cloud IAM, OIDC for humans, AppRole for machines.
- **Policies** in HCL grant paths and capabilities (`read`, `create`, `list`). Default deny.
- **Tokens** carry policies and a **TTL**; everything expires unless renewed.
- **Audit devices** log every request and response (with secrets hashed).

### Secrets engines

- **KV v2**: versioned static secrets.
- **Database**: creates a unique database user per request with a short lease, then drops it. No shared passwords.
- **Cloud engines** (AWS, Azure, GCP) issue short-lived cloud credentials.
- **PKI**: an internal certificate authority issuing short-lived TLS certificates.
- **Transit**: encryption as a service; apps send plaintext and get ciphertext without ever holding the key.

### Getting secrets into workloads

The **Vault Agent** sidecar or injector writes secrets to files and renews them; the **Secrets Store CSI driver** or **External Secrets Operator** syncs them into Kubernetes; apps can also call the API directly.

### Running it

Run at least three nodes with integrated **Raft** storage, enable auto-unseal, back up snapshots, and treat the root token as break-glass only.

**Good enough to move on:** you can run Vault in dev mode, authenticate a Kubernetes pod through the Kubernetes auth method, and have it fetch dynamic database credentials that expire after an hour.

## Key concepts

- **Seal, unseal and auto-unseal**
- **Auth methods**
- **Policies and tokens**
- **KV v2 secrets engine**
- **Dynamic database credentials**
- **PKI and Transit engines**
- **Vault Agent and injector**
- **Raft storage and HA**
- **OpenBao fork**

## Mini project

Deploy Vault to a local Kubernetes cluster, configure Kubernetes auth and the database secrets engine for Postgres, and inject short-lived credentials into an app pod with the Vault Agent injector.

## Check yourself

Why are dynamic database credentials safer than a single shared password stored in Vault's KV engine?

## Free resources

- [Vault documentation](https://developer.hashicorp.com/vault/docs) (HashiCorp)
- [Vault tutorials](https://developer.hashicorp.com/vault/tutorials) (HashiCorp)
- [OpenBao documentation](https://openbao.org/docs/) (OpenBao)

Previous: [Secrets Management Fundamentals](https://www.internhack.in/roadmaps/tracks/devops/secrets-management) · Next: [SOPS, Sealed Secrets and External Secrets](https://www.internhack.in/roadmaps/tracks/devops/sops-external-secrets)

## More in GitOps and Secrets Management

- [GitOps Principles](https://www.internhack.in/roadmaps/tracks/devops/gitops-principles)
- [Argo CD](https://www.internhack.in/roadmaps/tracks/devops/argo-cd)
- [Flux](https://www.internhack.in/roadmaps/tracks/devops/flux)
- [Secrets Management Fundamentals](https://www.internhack.in/roadmaps/tracks/devops/secrets-management)
- [HashiCorp Vault](https://www.internhack.in/roadmaps/tracks/devops/vault)
- [SOPS, Sealed Secrets and External Secrets](https://www.internhack.in/roadmaps/tracks/devops/sops-external-secrets)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [DevOps Engineer Roadmap](https://www.internhack.in/roadmaps/tracks/devops)
