Courseiva
Utilize Vault CLI and APIeasyMultiple SelectObjective-mapped

VA-003 Utilize Vault CLI and API Practice Question

Which TWO of the following are valid methods to authenticate to Vault using the CLI without using a token? (Choose two.)

⚠ Common exam trap

HashiCorp often tests the distinction between the `vault login` command (which performs tokenless authentication) and the `vault write` command (which requires an existing token), leading candidates to mistakenly choose D as a valid tokenless method because it appears to send credentials directly.

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=joe password=pass

The `vault login -method=userpass` command authenticates to Vault using the userpass auth method via the CLI, which does not require a pre-existing token. Instead, it directly exchanges the provided username and password for a client token from the Vault server. This is a standard tokenless authentication flow for the userpass method.

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 login -method=userpass username=joe password=pass

    Why this is correct

    This authenticates and sets the token for the CLI session.

  • vault login -method=ldap username=joe password=pass

    Why this is correct

    This is valid for LDAP authentication.

  • vault auth -method=ldap username=joe password=pass

    Why it's wrong here

    No such command; 'vault auth' is not valid.

  • vault write auth/userpass/login/joe password=pass

    Why it's wrong here

    This returns a token but does not set it for the CLI session.

  • vault token create -policy=default

    Why it's wrong here

    This creates a token but requires an existing token to authenticate.

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

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.