003 · Domain 1: Authentication methods · 15% of the exam
Task 1.3: Explain the difference between human vs. system authentication methods
Interactive logins with passwords, browsers and MFA versus machine logins with platform identity, role IDs and short-lived tokens, and why secrets should not be shared between the two.
Study it
Human and machine logins: interactive credentials versus platform identity
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 nightly job on an EC2 instance logs in with the userpass account of the engineer who wrote it; the password sits in the job's configuration file. Security wants audit entries that identify the job rather than a person, and no password or other Vault credential stored on the instance. Which change meets both goals?
AThe userpass auth method with a dedicated account for the job and user lockout turned on
BThe approle auth method with a role for the job and bind_secret_id left at its default
CThe aws auth method with the iam type, bound to the IAM role attached to the EC2 machine
DThe oidc auth method with an application registered for the job at the provider
Show the answer and why
AThe userpass auth method with a dedicated account for the job and user lockout turned on
Incorrect
The audit entries would name the job, but a userpass login needs a password, which would still be stored on the instance.
BThe approle auth method with a role for the job and bind_secret_id left at its default
Incorrect
By default a SecretID is required at login, and the job would have to keep it on the instance.
CThe aws auth method with the iam type, bound to the IAM role attached to the EC2 machine
Correct
The iam type signs a request with the instance's own AWS credentials, so nothing is stored for Vault, and the login maps to the job's role rather than a person.
DThe oidc auth method with an application registered for the job at the provider
Incorrect
OIDC roles complete the login in a user's browser, which an unattended job cannot do.
Human methods such as userpass, LDAP and OIDC identify people. Machine methods such as AWS, Kubernetes and AppRole identify workloads, and the platform-based ones use an identity the platform already provides instead of a stored secret.
Developers log in with vault login at a terminal. A service written in Go must authenticate by itself when it starts. How does such a service normally authenticate?
AIt calls the auth method's login endpoint through the HTTP API, often via a client library
BIt runs vault login and reuses the token the CLI keeps for later commands
CIt reuses a developer's CLI token copied into its configuration
DIt opens the Vault UI sign-in page in a headless browser
Show the answer and why
AIt calls the auth method's login endpoint through the HTTP API, often via a client library
Correct
API authentication is generally used for machines; each auth method has its own login endpoint.
BIt runs vault login and reuses the token the CLI keeps for later commands
Incorrect
That convenience is meant for interactive CLI users; a service talks to the API itself.
CIt reuses a developer's CLI token copied into its configuration
Incorrect
A copied human token ties the service to a person and their policies.
DIt opens the Vault UI sign-in page in a headless browser
Incorrect
The UI is for people; services use the API.
People log in interactively through the CLI or UI; services call the login API of a machine-oriented method and handle the returned token in code.
A lab team has no directory service or identity provider and needs individual logins for five engineers. Which method fits, and where are the passwords kept?
Auserpass, with passwords read from the team's existing password file
Bapprole, with one role and SecretID for each engineer
Cldap, pointed at the engineers' local system accounts
Duserpass, with each user's password stored by Vault on the method
Show the answer and why
Auserpass, with passwords read from the team's existing password file
Incorrect
userpass cannot read usernames and passwords from an external source.
Bapprole, with one role and SecretID for each engineer
Incorrect
AppRole is oriented to machines and is less useful for human operators.
Cldap, pointed at the engineers' local system accounts
Incorrect
ldap needs an LDAP server, which the lab does not have.
Duserpass, with each user's password stored by Vault on the method
Correct
userpass stores username and password pairs on the method itself, which suits a few people without a directory.
userpass is a human method whose credentials Vault itself holds; larger organizations usually delegate to a directory or identity provider instead.
Engineers sign in to everything with Okta, and security requires them to approve an Okta Verify push each time they log in to Vault. Which auth method provides that?
AThe userpass auth method combined with the TOTP secrets engine
BThe okta auth method, with MFA set up for the users on the Okta side
CThe approle auth method, with secret_id_num_uses set to 1
DThe cert auth method, with certificates issued by Okta
Show the answer and why
AThe userpass auth method combined with the TOTP secrets engine
Incorrect
A secrets engine does not add a login factor to userpass, and it sends no push.
BThe okta auth method, with MFA set up for the users on the Okta side
Correct
The okta method supports Okta Verify Push and TOTP during login when MFA is configured in Okta.
CThe approle auth method, with secret_id_num_uses set to 1
Incorrect
A single-use SecretID is a machine credential, not a push approval by a person.
DThe cert auth method, with certificates issued by Okta
Incorrect
The cert method checks TLS client certificates and sends no push.
Human logins often need a second factor; the okta method integrates Okta's own MFA into the Vault login.