How hashicorp/vault works
Vault is a secrets-management server: clients request secrets or cryptographic operations through a unified interface; Vault applies access controls, serves built-in secret and auth methods, persists data, and records audit events. The README documents secret storage, dynamic credentials, encryption, leases, renewal, and revocation. The sampled server and HTTP sources support the server-to-handler-to-core relationships; links from the core to individual engines are shown as unverified because their dispatch wiring was not sampled.
Main entry points: vault Vault Core · storage.go Logical Storage API · server.go Server Runtime · handler.go HTTP API
Components 18
Client and Server
- Vault Client
api/client.go - Server Runtime
command/server/server.go - HTTP API
http/handler.go - Vault Core
vault
Access and Audit
- Authentication Methods
api/auth.go - Audit System
audit/broker.go
Secret Engines
- KV Secrets
api/kv.go - Database Credentials
builtin/logical/database/path_creds_create.go - AWS Credentials
builtin/logical/aws/path_user.go - Transit Encryption
builtin/logical/transit/path_encrypt.go - PKI Issuance
builtin/logical/pki/acme_challenge_engine.go - Lease Lifecycle
api/sys_leases.go
Persistence and Services
- Logical Storage API
sdk/logical/storage.go - Physical Backends
helper/testhelpers/teststorage/teststorage.go - Encrypted Key Storage
sdk/helper/keysutil/encrypted_key_storage.go - Packed Storage
helper/storagepacker/storagepacker.go - Activity Records
vault/activity/query.go - Work Scheduling
helper/fairshare/jobmanager.go
Connections 17
- Vault Client → HTTP API: requests secrets
README.md - Server Runtime → HTTP API: configures handler
command/server/server.go - HTTP API → Vault Core: routes requests
http/handler.go - Server Runtime → Audit System: imports audit system
command/server/server.go - Vault Core → Authentication Methods: authenticates
- Vault Core → KV Secrets: serves secrets
- Vault Core → Database Credentials: generates credentials
README.md - Vault Core → AWS Credentials: generates credentials
README.md - Vault Core → Transit Encryption: encrypts data
README.md - Vault Core → PKI Issuance: issues certificates
- Vault Core → Lease Lifecycle: manages leases
README.md - Vault Core → Logical Storage API: uses storage interface
- Logical Storage API → Physical Backends: persists entries
- Encrypted Key Storage → Logical Storage API: wraps storage
sdk/helper/keysutil/encrypted_key_storage.go - Packed Storage → Logical Storage API: reads and writes
helper/storagepacker/storagepacker.go - Activity Records → Logical Storage API: stores activity data
- Work Scheduling → Server Runtime: schedules work