Chapter 7 / 28
Secrets Engines and Paths
HashiCorp Vault For Beginners5 min read
Vault isn’t just a tool for storing secrets. It’s a flexible platform that supports multiple types of secrets — from passwords and tokens to cloud credentials, certificates, encryption keys, and even dynamic access to infrastructure.
At the center of all this magic are Secrets Engines and Paths.
Let’s unpack both.
Secrets Engines: Not Just One Vault, But Many
A Secrets Engine is a backend plugin responsible for a specific type of secret.
Some examples:
| Engine | What it stores or does |
|---|---|
kv | Stores static key-value secrets |
aws | Dynamically generates AWS access credentials |
database | Generates database usernames/passwords on the fly |
transit | Performs cryptographic operations (sign, encrypt) |
pkI | Issues and manages TLS certificates |
identity | Manages entities and groups inside Vault |
In other words — Vault isn’t just one vault. It’s many vaults under one interface, each specialized for a particular type of secret or operation.
Think of each secrets engine as a plugin. When you enable one, you’re telling Vault, “I want to store this kind of data here.”
Enabling Secrets Engines
You enable engines like this:
vault secrets enable -path=mykv kv
This mounts the KV engine at mykv/.
You can have multiple mounts of the same engine, each with different purposes:
vault secrets enable -path=dev-kv kv
vault secrets enable -path=prod-kv kv
Each engine is isolated — secrets under dev-kv/ are completely separate from prod-kv/.
Paths: The Filesystem of Vault
Secrets live at paths, and paths are how you organize and control access to data.
For example:
secret/db/credsmight store static credentialsaws/creds/dev-rolemight generate dynamic AWS keystransit/keys/myappmight contain encryption keys
You can structure paths any way you like. Just like folders on a hard drive.
But paths are more than just location — they’re also the foundation for:
- Access Control (Who can access what)
- Auditing (Who accessed what)
- Policies (Rules applied per path)
We’ll dive into policies soon — but remember: Vault security is path-based.
Secrets Engine Types: A Quick Classification
Vault secrets engines can be broadly grouped:
| Category | Engines |
|---|---|
| Static storage | kv (v1 and v2) |
| Dynamic credentials | aws, gcp, database, rabbitmq, etc. |
| Encryption & signing | transit, pkI, ssh |
| Identity & auth | identity |
| Custom / community | Third-party plugins |
Some engines support dynamic secrets, meaning Vault generates the secret when you request it and automatically revokes it later.
This is one of Vault’s superpowers — never having to store or rotate secrets manually.
Why Paths and Engines Matter
- Paths define where secrets live, how they’re organized, and how they’re accessed.
- Secrets Engines define how those secrets behave and what they’re for.
Understanding this structure helps you:
- Avoid clutter and chaos in large Vault deployments
- Secure your environment with precision
- Build automation around dynamic secret generation
What’s Next?
You’ve now seen the structure beneath Vault — and why it’s so much more than a key-value store.
In the next chapter, we’ll learn how to define access policies, so your Vault isn’t a free-for-all.
We’ll write our first policy and assign it to a token. After all, what good is a vault if anyone can open every drawer?
Let’s lock it down.