Vault Intermediate — PKI, Encryption as a Service & Dynamic Secrets in Depth
PKI Secrets Engine — Vault as a private certificate authority
The same dynamic-secrets philosophy applies to certificates as to database credentials — instead of a long-lived TLS certificate manually rotated (or, worse, forgotten and left to expire unexpectedly), Vault's PKI engine issues short-lived certificates on demand, automatically expiring rather than requiring a manual rotation process most teams historically get wrong under time pressure.
Intermediate CAs — why production PKI setups don't issue directly from the root
Keeping the root CA's private key maximally protected (ideally never used for routine issuance at all) while an intermediate CA handles actual day-to-day certificate issuance limits the blast radius if the intermediate is ever compromised — the root can revoke and replace a compromised intermediate without needing to re-establish trust from scratch across every system that trusts the root.
Transit Secrets Engine — Encryption as a Service
The Transit engine is a fundamentally different pattern from KV or dynamic secrets — Vault never stores your actual data at all, only the encryption keys, performing encrypt/decrypt operations as a service. This is "encryption as a service": an application can encrypt/decrypt data using Vault-managed keys without ever needing to handle raw key material itself, and key rotation happens centrally without the application needing any code change.
Response Wrapping — passing a secret through an untrusted intermediary safely
If a secret needs to pass through a system that shouldn't itself be able to read it (a CI orchestration layer, a deployment pipeline), response wrapping returns a single-use token wrapping the actual response — only the intended final recipient, unwrapping it once, ever sees the real secret. If the wrapping token is intercepted and used by someone else first, the legitimate recipient's own unwrap attempt fails, which itself is a strong tamper-detection signal (someone else already consumed it).
Dynamic Secrets Beyond Databases
Vault's dynamic-secrets model extends well beyond database credentials — the same "generate on demand, short TTL, auto-revoke" pattern applies to cloud provider credentials (AWS IAM users/STS tokens, Azure service principals, GCP service accounts), SSH one-time passwords/signed certificates, and more. The specific secrets engine differs, but the underlying philosophy — a leaked credential should have a short, bounded useful life by design — is consistent across all of them.
Try It (2 Minutes)
Using the Transit engine section above:
rewrap after a key rotation, given old ciphertexts still decrypt fine without it?You should land on: no — the database only ever stored ciphertext; the actual encryption key material lives in Vault, which the attacker would need to separately compromise to decrypt anything; no — Vault retains old key versions specifically so previously-encrypted data remains decryptable, rotation doesn't invalidate old ciphertexts; rewrap re-encrypts data under the newest key version without ever exposing plaintext, useful for eventually retiring old key versions entirely once nothing depends on them anymore, and for defense-in-depth (limiting how much data any single key version's compromise would expose).

