Skip to content

003 · Domain 3: Vault tokens · 15% of the exam

Task 3.1: Choose between service and batch tokens based on use case

Service tokens with renewal, children, accessors and cubbyholes versus lightweight batch tokens with fixed TTLs, and where each scales or fails.

Study it

  • Service and batch tokens: features, cost and scale

    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

A serverless platform performs tens of thousands of short Vault logins a minute, each token used for a few seconds against Vault Enterprise performance secondary clusters in other regions. Creating tokens must cost as little storage as possible, and each token must work on any cluster in the replication set. Which tokens fit?

  1. ABatch tokens issued as children of a service token
  2. BOrphan batch tokens
  3. COrphan service tokens with a 1-minute TTL
  4. DPeriodic service tokens with a 1-minute period
Show the answer and why
  • ABatch tokens issued as children of a service token

    Incorrect

    A batch token with a parent can be used across performance clusters only if it is an orphan, since the parent's validity cannot be checked there.

  • BOrphan batch tokens

    Correct

    Batch tokens need no storage writes, and an orphan batch token can be used across performance replication clusters.

  • COrphan service tokens with a 1-minute TTL

    Incorrect

    Service tokens cost several storage writes each and cannot be used across performance replication clusters.

  • DPeriodic service tokens with a 1-minute period

    Incorrect

    Periodic service tokens are still heavyweight service tokens tied to the cluster that issued them.

Batch tokens are encrypted blobs with no storage cost, which suits high volume. Only orphan batch tokens are valid across performance replication clusters.

Question 2 · choose 2

A team is deciding whether its token workflow can move from service tokens to batch tokens. Which two of its needs can only service tokens meet? (Choose TWO.)

  1. AUsing the token on a performance replication secondary
  2. BUsing the token to create child tokens
  3. CCreating tokens without a write to storage
  4. DStoring data in the token's own cubbyhole
  5. EHaving the token stop working when its TTL ends
Show the answer and why
  • AUsing the token on a performance replication secondary

    Incorrect

    An orphan batch token can be used across performance replication clusters; a service token cannot.

  • BUsing the token to create child tokens

    Correct

    Service tokens can create child tokens; batch tokens cannot.

  • CCreating tokens without a write to storage

    Incorrect

    Batch token creation has no storage cost; service tokens need several writes.

  • DStoring data in the token's own cubbyhole

    Correct

    Service tokens have a cubbyhole; batch tokens have none.

  • EHaving the token stop working when its TTL ends

    Incorrect

    Both token types stop working at the end of their TTL.

Batch tokens trade features for scale: no renewal, children, accessors or cubbyhole, but no storage cost and use across performance clusters when orphaned.

Question 3 · choose 1

A token copied from a log starts with hvb. followed by random characters. What type of token is it, on Vault 1.10 or later?

  1. AA service token
  2. BA periodic token
  3. CA batch token
  4. DA root token
Show the answer and why
  • AA service token

    Incorrect

    Service tokens start with hvs.

  • BA periodic token

    Incorrect

    Periodic describes the renewal of a service token, and service tokens start with hvs.

  • CA batch token

    Correct

    Since Vault 1.10 batch tokens start with hvb.

  • DA root token

    Incorrect

    The prefix table has no root prefix; hvb. marks a different token type.

The prefix shows the type, but tokens are otherwise opaque: scripts should not rely on their internal structure.

Question 4 · choose 1

A security architect proposes that the break-glass root token be created as a batch token, so that it needs no storage and simply runs out on its own. What is wrong with the plan?

  1. ANothing; vault token create -type=batch -policy=root makes such a token
  2. BBatch tokens cannot be root tokens, so such a token cannot exist
  3. CA batch root token would never run out, since root tokens ignore TTLs
  4. DA batch root token would work only on the node that created it
Show the answer and why
  • ANothing; vault token create -type=batch -policy=root makes such a token

    Incorrect

    Whatever policy is requested, a batch token cannot be a root token.

  • BBatch tokens cannot be root tokens, so such a token cannot exist

    Correct

    The token type comparison lists being a root token as a service token capability that batch tokens lack.

  • CA batch root token would never run out, since root tokens ignore TTLs

    Incorrect

    There is no batch root token to run out or not; the batch type cannot carry root.

  • DA batch root token would work only on the node that created it

    Incorrect

    There are no batch root tokens at all, on any node.

Root tokens are always service tokens, so the choice between batch and service tokens never arises for root access.

Question 5 · choose 1

Security must be able to revoke an individual engineer's token the moment a laptop is reported stolen. Which token type supports that?

  1. ABatch tokens, which are revoked by their accessor
  2. BBatch tokens, which are revoked with vault token revoke
  3. CEither type, since all tokens can be revoked at any time
  4. DService tokens, which can be revoked manually
Show the answer and why
  • ABatch tokens, which are revoked by their accessor

    Incorrect

    Batch tokens have no accessors and cannot be revoked manually.

  • BBatch tokens, which are revoked with vault token revoke

    Incorrect

    Manual revocation is not available for batch tokens.

  • CEither type, since all tokens can be revoked at any time

    Incorrect

    Only service tokens can be revoked on demand.

  • DService tokens, which can be revoked manually

    Correct

    Service tokens are manually revocable; batch tokens are not and only stop working at expiry or with their parent.

Pick service tokens wherever on-demand revocation matters; batch tokens trade it away for scale.

Question 6 · choose 1

A batch token with 10 minutes of TTL left requests a database credential whose role has a 1-hour default TTL. How long does the credential's lease last?

  1. ANo longer than the batch token's remaining TTL
  2. B1 hour, the role's default TTL
  3. CUntil the batch token is renewed
  4. DUntil the 32-day system max TTL
Show the answer and why
  • ANo longer than the batch token's remaining TTL

    Correct

    Leases created by batch tokens are constrained to the batch token's remaining TTL.

  • B1 hour, the role's default TTL

    Incorrect

    A batch token's leases cannot outlive the batch token.

  • CUntil the batch token is renewed

    Incorrect

    Batch tokens cannot be renewed.

  • DUntil the 32-day system max TTL

    Incorrect

    The batch token's own remaining TTL is the limit.

With a batch token, a lease is capped at the token's remaining TTL and is tracked by the token's parent if it has one.

Practice domain 3 →Practice all domains →