Vault Architecture and Components
What you'll learn: How HashiCorp Vault's internal architecture — storage backends, seal/unseal mechanism, and client-server relationship — works together to secure your secrets.
Core Architecture
Vault operates on a client-server model where the Vault server stores and controls access to secrets, while clients (applications, CLI, APIs) request secrets through authenticated channels.
Think of Vault as a bank vault: the server is the vault itself with its locking mechanism, the storage backend is the safe deposit box room inside, and clients are customers who must authenticate to access their boxes.
Storage Backends
The storage backend is where Vault persists encrypted data. Vault supports multiple backends:
- Integrated Storage (Raft): Built-in, consensus-based storage for high availability
- Consul: Distributed key-value store for multi-datacenter deployments
- Cloud storage: S3, Azure Blob, GCS for managed durability
- Databases: PostgreSQL, MySQL (less common in production)
Critically, all data in the storage backend is encrypted. Even if someone gains direct access to your S3 bucket or Consul cluster, they cannot read secrets without Vault's encryption keys.
Seal/Unseal Mechanism
When Vault starts, it begins in a sealed state — encrypted and inaccessible. The seal/unseal process controls access to the master encryption key:
- Sealed: Vault cannot decrypt data or serve requests
- Unsealing: Requires providing key shares (using Shamir's Secret Sharing) or using auto-unseal with cloud KMS
- Unsealed: Vault can decrypt its master key and operate normally
This mechanism ensures that even if your server restarts unexpectedly, secrets remain protected until authorized operators explicitly unseal it.
Client-Server Relationship
Clients authenticate using tokens, cloud IAM roles, Kubernetes service accounts, or other auth methods. Once authenticated, they request secrets via HTTP API. The Vault server validates policies, retrieves encrypted data from the backend, decrypts it, and returns it over TLS.
Key Takeaway: Vault's architecture separates encrypted storage (backend), access control (seal/unseal), and client authentication to create defense-in-depth for secrets management.