Exam HCVA0-003 Topic 7 Question 193 Discussion

Actual exam question for HashiCorp's HCVA0-003 exam
Question #: 193
Topic #: 7
After creating a dynamic credential on a database, the DBA accidentally deletes the credentials on the database itself. When attempting to remove the lease, Vault returns an error stating that the credential cannot be found. What command can be run to make Vault remove the secret?

Suggested Answer: A Vote an answer

Comprehensive and Detailed in Depth Explanation:
When a dynamic credential is deleted externally, Vault may fail to revoke the lease due to the missing backend secret. The HashiCorp Vault documentation states: " The -force flag is meant for recovery situations where the secret in the target platform was manually removed. " The command vault lease revoke -force - prefix < lease_path > allows Vault to forcibly revoke all leases under the specified prefix, bypassing the error.
The docs elaborate: " Using -force with -prefix will revoke all leases that match the given prefix, even if the underlying secrets cannot be found or revoked on the target system. This is useful for cleaning up Vault's lease table when external changes disrupt normal revocation. " Here, < lease_path > would be the path like database/creds/role/. B (vault lease -renew) renews leases, not removes them. C (-enforce) is not a valid flag.
D (vault revoke -apply) is incorrect syntax. Thus, A is correct.
Reference:
HashiCorp Vault Documentation - Lease Revoke Command: Force

by Mary at Jul 16, 2026, 01:10 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10