HCVA0-003 practice question 28 of 35

True or False? The command vault lease revoke -prefix aws/ will revoke all leases associated with the secret engine mounted at /aws.

Full set: 285 questions
Answer options
A: True
B: False
Correct Answer:
T; R; U; E
Explanation

The statement is correct. The vault lease revoke command, when used with the -prefix flag, revokes all leases whose lease IDs start with the provided string. In HashiCorp Vault, lease IDs are structured with the mount path of the secrets engine as a prefix. For a secrets engine mounted at aws/, all leases it generates (e.g., for credentials from aws/creds/my-role) will have a lease ID that begins with aws/. Consequently, the command vault lease revoke -prefix aws/ will match and revoke every active lease associated with that specific secrets engine mount.

Why Incorrect

The alternative, "False," is incorrect. This would imply that the command either does not revoke all leases or that the prefix does not correspond to the mount path. However, the explicit design of the -prefix flag is to enable bulk revocation operations targeted at a common lease ID prefix, which directly correlates to the path where the secrets engine is mounted.

References

1. HashiCorp Vault Official Documentation, "Lease Command (CLI)": The documentation for the vault lease revoke command explicitly defines the function of the -prefix flag. It states, "If specified, the lease ID is treated as a prefix. All leases with the given prefix will be revoked." This confirms that the command operates on prefixes of lease IDs.

Source: HashiCorp, "Vault CLI: lease revoke", Vault Documentation. Accessed under the revoke subcommand section.

2. HashiCorp Vault Official Documentation, "Concepts - Leases": The conceptual documentation on leases explains their structure. A lease ID is composed of the path from which the secret was generated, followed by a unique identifier. This structure ensures that all leases from a specific mount point (e.g., aws/) will share that common prefix in their lease ID.

Source: HashiCorp, "Vault Concepts: Leases", Vault Documentation. Accessed under the "Lease IDs" section.

Scroll to Top