VA-003 Utilize Vault CLI and API Practice Question
Which TWO of the following are valid methods to authenticate to Vault using the CLI?
⚠ Common exam trap
HashiCorp often tests the distinction between the deprecated `vault auth` and the current `vault login` command, as well as the correct environment variable (`VAULT_TOKEN` vs. `VAULT_AUTH`), to catch candidates who rely on outdated documentation or assume generic naming conventions.
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
✓
vault login -method=userpass username=jdoe
`vault login -method=userpass username=jdoe` is the valid CLI command to authenticate using the userpass auth method, which prompts for the password interactively. Option E is correct because `vault login -method=ldap username=jdoe` is the valid CLI command to authenticate using the LDAP auth method, also prompting for the password. Both commands follow the standard `vault login -method=<type>` syntax required by the Vault CLI.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
vault auth -method=token token=s.abc
Why it's wrong here
Invalid; 'vault auth' is not a command; use 'vault login'.
- ✓
vault login -method=userpass username=jdoe
Why this is correct
Valid; userpass authentication via CLI.
- ✗
vault authenticate -method=userpass username=jdoe
Why it's wrong here
Invalid; 'vault authenticate' is not a command.
- ✗
Setting environment variable VAULT_AUTH=s.abc
Why it's wrong here
Invalid; the correct environment variable is VAULT_TOKEN.
- ✓
vault login -method=ldap username=jdoe
Why this is correct
Valid; LDAP authentication via CLI.
Go deeper
Related to this question
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 →
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.