Skip to content

003 · Domain 4: Vault leases · 7% of the exam

Task 4.1: Explain the purpose of a lease ID

The lease Vault attaches to each dynamic secret and service token, the lease ID it returns, its path prefix, and what has no lease.

Study it

  • Lease IDs: what gets a lease and how the ID is built

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the HashiCorp documentation page that proves it.

Question 1 · choose 1

An auditor wants every credential an application gets from Vault to be revocable through its lease ID. The application reads a database credential from the database secrets engine, reads a configuration value from a KV v2 secret, and encrypts records with the transit engine. Which of these responses comes with a lease ID that Vault can revoke?

  1. AThe database credential and the KV value
  2. BOnly the database credential
  3. CAll three, since every response from Vault carries a lease ID
  4. DThe database credential and the transit ciphertext
Show the answer and why
  • AThe database credential and the KV value

    Incorrect

    The KV engine stores arbitrary values and does not issue leases.

  • BOnly the database credential

    Correct

    The database engine returns the credential with a lease ID; KV does not issue leases, and transit returns ciphertext without one.

  • CAll three, since every response from Vault carries a lease ID

    Incorrect

    Leases come with dynamic secrets such as database credentials, not with every response.

  • DThe database credential and the transit ciphertext

    Incorrect

    Transit stores nothing and returns ciphertext for the caller to keep; there is nothing to lease.

A lease is Vault's promise that a dynamic secret is valid for a time, and its lease ID is what renew and revoke act on. Static KV values and transit results have no lease.

Question 2 · choose 1

A developer writes a KV version 1 secret with vault kv put kv/partner ttl=30m api_key=k-123 and expects Vault to delete it after 30 minutes, like an expiring credential. What happens when the 30 minutes pass?

  1. AVault revokes the secret's lease and deletes its data
  2. BThe secret is deleted unless someone renews it with vault lease renew
  3. CThe secret becomes unreadable until someone writes it again
  4. DNothing; the value stays, and ttl only hints how often to re-read it
Show the answer and why
  • AVault revokes the secret's lease and deletes its data

    Incorrect

    The KV engine issues no lease and never removes data on its own.

  • BThe secret is deleted unless someone renews it with vault lease renew

    Incorrect

    There is no lease to renew; the ttl key is advisory.

  • CThe secret becomes unreadable until someone writes it again

    Incorrect

    Nothing is removed or hidden; the value stays readable after the 30 minutes.

  • DNothing; the value stays, and ttl only hints how often to re-read it

    Correct

    KV does not enforce TTLs; the ttl value is returned as a refresh interval for consumers.

The KV engine treats ttl as advisory: consumers use it to decide when to check back for a new value, and the data stays until someone changes or deletes it.

Question 3 · choose 1

Which of these items does Vault create a lease for?

  1. AACL policies written with vault policy write
  2. BEntity aliases created at a user's first login
  3. CService tokens issued at a userpass login
  4. DAudit devices enabled with vault audit enable
Show the answer and why
  • AACL policies written with vault policy write

    Incorrect

    Policies are configuration, not leased secrets.

  • BEntity aliases created at a user's first login

    Incorrect

    Aliases are identity records that link a login to an entity; they carry no lease.

  • CService tokens issued at a userpass login

    Correct

    Vault creates a lease for every service type authentication token.

  • DAudit devices enabled with vault audit enable

    Incorrect

    Audit devices are configuration and carry no lease.

A service token's lease records its TTL and renewability, which is what renewal and revocation act on; configuration and identity records have none.

Question 4 · choose 1

An operator wants to see every lease ID issued under database/creds/app/ before deciding what to revoke. Which call lists them?

  1. AA LIST on sys/leases/lookup/database/creds/app/ with sudo
  2. BA LIST on database/creds/app/, which returns the issued usernames
  3. CA read of sys/leases/count with the prefix in the body
  4. DA LIST on auth/token/accessors, which shows each lease ID
Show the answer and why
  • AA LIST on sys/leases/lookup/database/creds/app/ with sudo

    Correct

    Lease IDs under a prefix are listed through sys/leases/lookup, a root-protected path.

  • BA LIST on database/creds/app/, which returns the issued usernames

    Incorrect

    The engine's creds path generates credentials; it does not list leases.

  • CA read of sys/leases/count with the prefix in the body

    Incorrect

    The count endpoint returns lease totals, not the lease IDs.

  • DA LIST on auth/token/accessors, which shows each lease ID

    Incorrect

    That lists token accessors, not secret leases.

Treat lease listing like other root-protected endpoints and grant sudo on it only to operators.

Question 5 · choose 1

On Vault Enterprise, a runaway job once requested thousands of database credentials within minutes, each with its own lease. The team wants a hard cap on how many leases the database mount can have in use at one time. Which feature does that?

  1. AA rate limit quota on the database mount's path
  2. BA lease count quota on the database mount's path
  3. CA lower max_ttl on every role of the database mount
  4. DAn audit device filter on the database mount
Show the answer and why
  • AA rate limit quota on the database mount's path

    Incorrect

    Rate limits cap the request rate per client; they do not cap how many leases exist.

  • BA lease count quota on the database mount's path

    Correct

    Vault Enterprise lease count quotas limit the number of leases that can be in use at one time.

  • CA lower max_ttl on every role of the database mount

    Incorrect

    Shorter leases end sooner, but nothing stops a burst from creating thousands of them.

  • DAn audit device filter on the database mount

    Incorrect

    Audit devices record requests; they do not limit how many leases exist.

Resource quotas protect Vault from misbehaving clients: rate limits on request volume and, on Vault Enterprise, lease count quotas on how many leases are in use.

Practice domain 4 →Practice all domains →