HashiCorp Vault
Centralized secrets management for secure storage, access control, and dynamic provisioning of keys, certificates, and API credentials.
Classification
- ComplexityHigh
- Impact areaTechnical
- Decision typeTechnical
- Organizational maturityIntermediate
Technical context
Principles & goals
Use cases & scenarios
Compromises
- Single point of failure without high-availability architecture
- Misconfigured policies can lead to over-privileged access
- Faulty migration or key rotation can cause outages
- Enforce least-privilege principle in policies
- Use automatic rotation for short-lived secrets
- Enable audit logging and review regularly
I/O & resources
- Authentication backend (e.g. AppRole, Kubernetes, LDAP)
- Definition of policies and roles
- Backend storage and key management for Vault unseal
- Secure secrets with access restrictions
- Audit logs and access evidence
- Automatically generated short-lived credentials
Description
HashiCorp Vault is a secrets management and data protection system for securely storing, accessing, and distributing credentials, API keys, certificates, and encryption keys. It centralizes secret lifecycle management, enforces fine-grained access policies, and provides audit logging and dynamic secrets to reduce credential sprawl across infrastructure and applications.
✔Benefits
- Reduces secret exposure and hard-coded credentials
- Supports dynamic, short-lived credentials
- Centralized auditing and policy enforcement
✖Limitations
- Operation and HA require infrastructure and operational effort
- Complex policy and role modeling for large environments
- Network dependency can affect latency or availability
Trade-offs
Metrics
- Number of stored secrets
Measures total number of secrets managed in Vault and indicates scope and growth.
- Average latency for secret retrievals
Time between request and response; important for services' performance SLAs.
- Secret rotation frequency
Frequency at which secrets are automatically rotated; indicator of security hygiene.
Examples & implementations
Central secrets for a SaaS platform
A SaaS provider uses Vault to centrally manage database passwords and API keys to restrict permissions and enable auditing.
Dynamic DB credentials in CI/CD
CI/CD pipelines fetch short-lived database credentials from Vault, removing long-lived credentials from pipelines.
Internal PKI for microservices
A company runs an internal PKI via Vault to automatically issue and renew TLS certificates for internal services.
Implementation steps
Plan: define requirements, auth backends, storage and HA.
Install: deploy Vault servers and configure storage backend.
Configure: create auth methods, policies, roles and secrets engines.
Integrate: connect and test applications and pipelines.
Operate: establish monitoring, backup, rotation and incident processes.
⚠️ Technical debt & bottlenecks
Technical debt
- Legacy, manually managed secrets that still need migration
- Missing automation for secret rotation in some services
- Insufficient monitoring of Vault performance under load
Known bottlenecks
Misuse examples
- Using Vault tokens with unlimited lifetime for services
- Storing sensitive keys in an unencrypted backend
- Directly sharing root unseal keys instead of using a KMS
Typical traps
- Underestimating operational effort for HA and backups
- Faulty policy tests lead to outages in production services
- Ignoring audit logs and alerts on unusual accesses
Required skills
Architectural drivers
Constraints
- • Requirement for secure storage backends (e.g. consistent KMS)
- • Network accessibility and firewall rules must be adjusted
- • Dependency on supported auth and secret backends