VA-003 Create Vault policies Practice Question
Exhibit
$ vault policy read my-policy
path "secret/data/production/*" {
capabilities = ["read"]
}
path "secret/data/staging/*" {
capabilities = ["create", "update"]
}Refer to the exhibit. A user with this policy tries to write a new secret to "secret/data/production/db". What will happen?
⚠ Common exam trap
A common misunderstanding in HashiCorp Vault is that path matching alone is sufficient for an operation to succeed, overlooking that each capability (e.g., read, create, update) must be explicitly granted in the policy.
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
✓
The write fails because the policy only allows read on production.
The policy only grants 'read' capability on the 'secret/data/production/*' path, which allows reading secrets but not creating or updating them. Writing a new secret requires 'create' or 'update' capabilities (or 'write' which encompasses both). Since the policy lacks these capabilities, the write operation fails regardless of whether the secret already exists.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The write succeeds if the secret already exists.
Why it's wrong here
Even if it exists, update requires the update capability, which is not granted.
- ✗
The write succeeds because the path matches.
Why it's wrong here
Matching path is not enough; the capabilities must allow the operation.
- ✓
The write fails because the policy only allows read on production.
Why this is correct
Only read is allowed on production paths, so write is denied.
- ✗
The write fails because the user does not have list capability.
Why it's wrong here
List is not required for write; the issue is missing create/update.
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.