VAULT-ASSOCIATE-002 · Question #18
The secrets engine is enabled at secret/. See the following policy: key/value v2 Which of the following operations are permitted by this policy? (Choose two.)
The correct answer is A. vault kv get secret/webapp1 B. vault kv put secret/webapp1 apikey-"ABCDEFGHIDK123W". Given a policy with read and update capabilities for secret/webapp1, a user can read and write secrets at that specific path.
Question
Exhibit
Options
- Avault kv get secret/webapp1
- Bvault kv put secret/webapp1 apikey-"ABCDEFGHIDK123W"
- Cvault kv metadata get secret/webapp1
- Dvault kv delete secret/super-secret
- Evault kv list secret/super-secret
How the community answered
(40 responses)- A85% (34)
- C3% (1)
- D5% (2)
- E8% (3)
Why each option
Given a policy with `read` and `update` capabilities for `secret/webapp1`, a user can read and write secrets at that specific path.
The `vault kv get secret/webapp1` command performs a read operation on `secret/webapp1`, which is explicitly permitted by the policy's `read` capability for that path.
The `vault kv put secret/webapp1` command performs an update (write) operation on `secret/webapp1`, which is explicitly permitted by the policy's `update` capability for that path.
The `vault kv metadata get secret/webapp1` command would require `read` capability on `secret/metadata/webapp1` or specific `read` access to the metadata path, which is not granted by the policy focused on `secret/webapp1`'s data.
The policy only grants access to `secret/webapp1`, not `secret/super-secret`, and also does not grant `delete` capability.
The policy only grants access to `secret/webapp1`, not `secret/super-secret`, and does not grant `list` capability, which applies to the parent path.
Concept tested: Vault KV secrets engine policy capabilities
Source: https://developer.hashicorp.com/vault/docs/concepts/policies#capabilities
Topics
Community Discussion
No community discussion yet for this question.
