HCVA0-003 practice question 32 of 35

When a lease is created, what actions can be performed by using only the lease ID? (Choose two)

Full set: 285 questions
Answer options
A: Renew the lease Correct answer
B: Revoke the lease Correct answer
C: Extend the max TTL for the lease
D: Authenticate using the lease ID
Correct Answer:
A. Renew the lease; B. Revoke the lease
Explanation

A lease ID is a unique identifier for a dynamic secret's lease, which controls its Time-to-Live (TTL). The primary lifecycle management actions for a lease are renewal and revocation. Renewal extends the lease's duration, preventing it from expiring, up to the configured maximum TTL. Revocation immediately invalidates the secret and its lease, making it unusable. Both the vault lease renew and vault lease revoke commands (and their corresponding API endpoints, /sys/leases/renew and /sys/leases/revoke) operate directly on a lease by specifying its unique lease ID as the target of the action.

Why Incorrect

C. Extend the max TTL for the lease: The maximum TTL is a property configured on the secrets engine's role or mount, not on an individual lease. It cannot be modified for a lease after it has been created.
D. Authenticate using the lease ID: A lease ID is used to manage a secret's lifecycle, not for authentication. Authentication in Vault is performed using auth methods that issue tokens, which are the primary credentials for API requests.

References

1. HashiCorp Vault Official Documentation, "Leases" Concept Guide: "Every dynamic secret in Vault has a lease associated with it... Leases can be renewed and revoked." This statement establishes renewal and revocation as the fundamental operations for a lease.

Source: HashiCorp, Vault Documentation, "Concepts - Leases".

2. HashiCorp Vault Official Documentation, API: sys/leases/renew: This document specifies the API endpoint for renewing a lease. The primary parameter required in the request body is the leaseid of the lease to be renewed.

Source: HashiCorp, Vault Documentation, "API - System Backends - Leases - Renew Lease".

3. HashiCorp Vault Official Documentation, API: sys/leases/revoke: This document details the API endpoint for revoking a lease. The endpoint requires the leaseid to identify which lease to revoke.

Source: HashiCorp, Vault Documentation, "API - System Backends - Leases - Revoke Lease".

4. HashiCorp Vault Official Documentation, "Tokens" Concept Guide: This guide explains that tokens are the core method for authentication within Vault. It does not mention lease IDs as a mechanism for authentication, confirming their distinct purpose.

Source: HashiCorp, Vault Documentation, "Concepts - Tokens".

Scroll to Top