VA-003 Manage Vault leases Practice Question
A Vault admin needs to revoke all leases under the `database/creds/readonly` path without revoking leases from other paths. Which command should the admin use?
⚠ Common exam trap
Many exam-takers confuse the `-prefix` flag with other flags or omitting it, leading to either an invalid lease ID error or an overly broad revocation.
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
✓
vault lease revoke -prefix database/creds/readonly
To revoke all leases under a specific secrets engine path, the admin must use `vault lease revoke -prefix <path>`. The `-prefix` flag tells Vault to revoke every lease whose ID begins with the given string, which effectively targets all leases generated by that path. Other flags either expect a full lease ID or revoke everything cluster-wide.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
vault lease revoke -prefix database/creds/readonly
Why this is correct
The `vault lease revoke -prefix` command revokes all leases whose IDs start with the given prefix. Specifying `database/creds/readonly` targets exactly the leases created by that role, leaving other paths untouched. This is the correct way to perform a scoped, bulk revocation of leases under a specific secrets engine path.
- ✗
vault lease revoke -force database/creds/readonly
Why it's wrong here
There is no `-force` flag for `vault lease revoke`. The command does not support forcing revocation of a path. The correct flag to revoke all leases under a path is `-prefix`. Using an unsupported flag results in an error, and the leases under the specified path would remain active, failing the admin's goal.
- ✗
vault lease revoke database/creds/readonly
Why it's wrong here
Without the `-prefix` flag, the command expects a full lease ID, not a path. `database/creds/readonly` is not a valid lease ID, so the command fails. To revoke all leases under a path, the `-prefix` flag is required. This option would not revoke any leases and would likely return an error about an invalid lease ID.
- ✗
vault lease revoke -all database/creds/readonly
Why it's wrong here
The `-all` flag does not accept a path argument; it revokes all leases in the entire Vault cluster. Combining `-all` with a path is invalid and would either error or, if interpreted loosely, revoke far more than intended. This option is dangerous and does not achieve the scoped revocation the admin needs.
Go deeper
Related to this question
About these practice questions
This VA-003 question is part of Courseiva's 366-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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official HashiCorp exam blueprint
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.