VA-003 Create Vault policies Practice Question
A DevOps team needs to create a Vault policy that allows reading secrets from path "secret/data/app" but only for the key "db_password". They want to enforce this using Vault's policy syntax. Which policy statement achieves this?
⚠ Common exam trap
A common trap is confusing Vault's `allowed_parameters` (which restricts which keys can be accessed within a path) with `required_parameters` (which mandates that certain keys be present in the request). Candidates often choose option D, thinking it restricts access to only the specified key, but `required_parameters` does not restrict access; it only requires those parameters to be provided in the request, allowing access to all keys if the required params are present.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
path "secret/data/app" { capabilities = ["read"]; allowed_parameters = {"db_password"=[]} }
Vault policy syntax uses `allowed_parameters` to restrict which keys within a path can be read. By setting `allowed_parameters = {"db_password"=[]}`, the policy permits reading only the `db_password` key under `secret/data/app`, while denying access to any other keys at that path. This enforces the requirement precisely.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
path "secret/data/app" { capabilities = ["read"]; allowed_parameters = {"db_password"=[]} }
Why this is correct
This allows reading only the key db_password, with any value.
- ✗
path "secret/data/app" { capabilities = ["read"] }
Why it's wrong here
This allows reading all keys under the path, not just db_password.
- ✗
path "secret/data/app/db_password" { capabilities = ["read"] }
Why it's wrong here
This path is incorrect; KV v2 stores data under secret/data/app, not secret/data/app/db_password.
- ✗
path "secret/data/app" { capabilities = ["read"]; required_parameters = ["db_password"] }
Why it's wrong here
This requires the parameter but does not restrict to only db_password; other keys could also be read.
Visual reference
Go deeper
Related to this question
About these practice questions
This VA-003 question is part of Courseiva's 498-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This VA-003 practice question is part of Courseiva's free HashiCorp certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the VA-003 exam.