VA-003 Compare authentication methods Practice Question
A security team wants to allow applications to authenticate to Vault without storing any secrets in configuration files. The applications run on AWS EC2 instances with an IAM role attached. Which Vault authentication method leverages the EC2 instance metadata to obtain credentials?
⚠ Common exam trap
HashiCorp often tests the distinction between authentication methods that require pre-shared secrets (like AppRole) versus those that leverage cloud instance metadata (like AWS IAM), leading candidates to mistakenly choose AppRole because it is commonly associated with machine authentication.
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
✓
AWS IAM authentication
AWS IAM authentication (option D) is correct because it allows applications running on EC2 instances with an attached IAM role to authenticate to Vault without storing any secrets. The Vault client uses the EC2 instance metadata service (IMDS) to retrieve the instance identity document and its signature, which are then presented to Vault. Vault verifies these credentials against the AWS API, confirming the instance's identity and IAM role, thereby enabling secure, secretless authentication.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
GCP IAM authentication
Why it's wrong here
GCP IAM authentication verifies Google Cloud service account identity, which EC2 instances with an IAM role do not possess, so it cannot obtain credentials from EC2 instance metadata. It is tempting because it is a cloud-native, secretless method, but it is correct only for workloads running on Google Cloud.
- ✗
Userpass authentication
Why it's wrong here
Userpass requires a stored username and password, directly violating the requirement to keep no secrets in configuration files. It is tempting because it is simple to configure, but it is the right choice only for human operators authenticating interactively, not for automated applications needing secretless EC2 metadata authentication.
- ✗
AppRole authentication
Why it's wrong here
AppRole authenticates using a RoleID and SecretID delivered to the application, which must be stored or injected, contradicting the no-secrets-in-configuration requirement. It is tempting because AppRole suits automated workloads, but it is correct only where those credentials can be supplied securely without embedding static secrets.
- ✓
AWS IAM authentication
Why this is correct
AWS IAM authentication has Vault verify the instance's signed PKCS#7 metadata document against AWS, issuing a token without stored secrets. This satisfies the constraint that applications on EC2 with an attached IAM role authenticate using instance metadata rather than configuration-file credentials.
Go deeper
Related to this question
About these practice questions
This VA-003 question is part of Courseiva's 366-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.