VAULT-ASSOCIATE-002 · Question #89
What does the following policy do?
The correct answer is A. Grants access for each user to a KV folder which shares their id. A Vault policy designed to grant access for each user to a KV folder sharing their ID typically uses {{identity.entity.name}} in the path.
Question
Exhibit
Options
- AGrants access for each user to a KV folder which shares their id
- BGrants access to a special system entity folder
- CAllows a user to read data about the secret endpoint identity
- DNothing, this is not a valid policy
How the community answered
(30 responses)- A93% (28)
- B3% (1)
- C3% (1)
Why each option
A Vault policy designed to grant access for each user to a KV folder sharing their ID typically uses `{{identity.entity.name}}` in the path.
Vault policies support templated paths using identity metadata, such as `{{identity.entity.name}}`. This allows administrators to create a single policy that dynamically grants users (or entities) read/write access to a specific path within a secrets engine that matches their own identity's name, enabling self-service or isolated secret storage based on their ID.
While a policy might grant access to specific folders, the phrasing 'special system entity folder' is vague and does not specifically address how access is tied to *each user's ID*.
This option describes reading data *about* an identity endpoint, which is different from granting access to a KV folder whose name is based on the user's ID.
Policies with templated paths using identity aliases are valid and commonly used for dynamic, identity-aware access control in Vault.
Concept tested: Vault policy templating (identity aliases)
Source: https://developer.hashicorp.com/vault/docs/concepts/policies#template-policies
Topics
Community Discussion
No community discussion yet for this question.
