Chapter 94: HashiCorp Vault and Secrets Management
94.7 Authentication versus secrets engines
Story (fictional teaching scenario). At a fictional Kochi shop, Maya from London tries to log in at a KV path. Rohan separates who you are from what operation you request.
Why
A password store is not an identity proof. Authentication and secret operations need different configuration.
What
- Auth method verifies identity and normally returns a Vault token with policies.
- Authentication asks who the caller is.
- Authorization checks what that identity is allowed to do.
- A secrets engine performs an authorized secret operation, not the initial identity proof.
How
-
Choose the appropriate human or workload auth method.
-
Map verified identities to scoped policies.
-
Use the resulting identity only for required engine paths.
Example 1: Two routes
- Read the command or request.
POST /v1/auth/approle/login
GET /v1/secret/data/shop
- Read the result.
Output (illustrative; NOT executed against Vault)
First route: verifies configured workload proof.
Second route: reads KV v2 data if authorized.
- Line by line: The auth route is separate from secret/. Logging in does not grant root access. A token returned by auth is sensitive; this example intentionally shows no token value.
Ravindra Bagale's Tip
Authentication proves identity; policy decides access.
Authentication ओळख तपासतं; policy access ठरवते.
Authentication पहचान जाँचता है; policy access तय करती है.
Did you understand? Let us try it once more.