HashiCorp Vault
A service that controls access to passwords, API keys, and other secrets. It can retrieve stored secrets for authorized users and applications or generate short-lived credentials on demand.
Also known as: Vault
What HashiCorp Vault does
If several applications share a database password baked into their deployment configuration, changing that password means coordinating every consumer. Vault gives each application a way to authenticate and request the secrets it needs at runtime. It can store an API key you already have or generate credentials for a system it manages. Those are different jobs: putting an existing password in Vault does not make Vault rotate it in the external system.
What happens when a client asks for a secret?
The client first proves its identity through an authentication method. A human might sign in through an OpenID Connect provider, while an application might present a Kubernetes service account token. After a successful login, Vault issues its own token. The token’s policies determine which operations it can perform on which Vault API paths. A policy can let a service read a particular secret without letting it change the value or read its neighbors.
The request then reaches a secrets engine. The KV engine retrieves stored values; the Database engine can create short-lived database users; and the Transit engine can encrypt or decrypt application data without handing the encryption key to the caller. Vault encrypts its stored data, while TLS protects network traffic to Vault. An enabled audit device records requests and responses, protecting most string values with HMAC by default.
Example: a CI job that runs database migrations
A CI job authenticates to Vault using its workload identity and requests credentials from database/creds/migrator. The Database engine creates a temporary account with the permissions needed for migrations. Vault returns a username, a password, and a lease with a time to live (TTL). When that lease expires, Vault initiates revocation in the database. The job needs a TTL long enough to finish or a way to renew the lease if renewal is allowed. It should also avoid printing the credentials in its build logs: Vault controls their issuance, not what the job does with them afterward.
What interviewers look for
Be ready to distinguish a Vault token, which authorizes requests to Vault, from a secret lease, which tracks the lifetime of an issued secret. Then explain what happens during an outage. An application may still be able to use credentials it already holds, but a new instance may not be able to start, and a running one may fail once it needs to renew or replace its credentials. A good answer connects that failure mode to concrete choices: how to keep Vault reachable, how to detect failed renewals, and how to update a connection pool when credentials change.