Courseiva
Compare authentication methodshardMultiple ChoiceObjective-mapped

AppRole Authentication: How to Configure Single-Use SecretIDs

An administrator configures AppRole with a RoleID and SecretID. They want to ensure that each SecretID can be used only once. Which configuration should they use?

Quick Answer

The answer is to set `secret_id_num_uses=1` in the AppRole role configuration. This parameter directly enforces single-use SecretID behavior by limiting the number of times a given SecretID can be presented during login; after the first successful authentication, Vault automatically revokes that SecretID, making it impossible to reuse. On the HashiCorp Vault Associate VA-003 exam, this concept tests your understanding of AppRole’s fine-grained control over credential lifecycle, often appearing as a distractor where candidates confuse `secret_id_num_uses` with `token_num_uses` or `secret_id_ttl`. A common trap is thinking that setting `token_num_uses=1` achieves the same result, but that limits the token’s lifespan, not the SecretID’s usage. To remember: think “SecretID, one and done” — the SecretID itself is consumed after a single login, while the token it generates can have its own separate constraints.

⚠ Common exam trap

HashiCorp often tests the distinction between `secret_id_num_uses` (controls SecretID reuse) and `token_num_uses` (controls token reuse), leading candidates to confuse the two and incorrectly select Option A.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Set secret_id_num_uses=1 in the role.

Setting `secret_id_num_uses=1` in the AppRole role configuration ensures that each SecretID can be used only once to obtain a token. Once the SecretID is used for login, it is automatically revoked and cannot be reused. This directly satisfies the requirement of single-use SecretIDs.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Set token_num_uses=1 in the role.

    Why it's wrong here

    token_num_uses limits the generated token, not the SecretID.

  • Set bound_cidr_list to a specific IP.

    Why it's wrong here

    CIDR list restricts network access, not usage count.

  • Set secret_id_ttl=1s in the role.

    Why it's wrong here

    TTL controls time, not usage count.

  • Set secret_id_num_uses=1 in the role.

    Why this is correct

    secret_id_num_uses limits the number of times a SecretID can be used.

About these practice questions

One of 498 original VA-003 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on VA-003

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Which THREE factors contribute to the security of the AppRole authentication method? (Choose three.)

hard
  • A.Keeping the RoleID secret
  • B.Configuring token policies
  • C.Setting a secret_id_num_uses limit
  • D.Binding the SecretID to a specific CIDR block
  • E.Setting a secret_id_ttl

Why C: Setting a `secret_id_num_uses` limit restricts the number of times a SecretID can be used to obtain a token from Vault. This prevents replay attacks and limits the blast radius if a SecretID is leaked, as it becomes invalid after the specified number of uses.

Variation 2. Drag and drop the steps to enable AppRole authentication in Vault into the correct order.

medium
  • A.Enable AppRole authentication, create a role, retrieve the RoleID, generate a SecretID, then login.
  • B.Create a role, enable AppRole authentication, retrieve the RoleID, generate a SecretID, then login.
  • C.Enable AppRole authentication, create a role, generate a SecretID, retrieve the RoleID, then login.
  • D.Enable AppRole authentication, create a role, retrieve the RoleID, login, then generate a SecretID.

Why A: First enable the auth method, then create the role, then retrieve the RoleID, generate a SecretID, and finally login.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This VA-003 practice question is part of Courseiva's free HashiCorp certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the VA-003 exam.