Topic 1 Question #1
You are using the Vault userpass auth method mounted at auth/userpass. How do you create a new user named "sally" with password "h0wN0wB4r0wnC0w"? This new user will need the power-users policy.
Answer: D
Option Analysis:
A. Option A is incorrect because it does not follow the correct Vault CLI syntax for writing userpass user configuration including the required password and policy assignment.
B. Option B is incorrect because it targets an incorrect endpoint or uses an invalid operation for creating a new user in the userpass auth method.
C. Option C is incorrect because it either omits the required policy assignment, uses the wrong password format, or references an incorrect mount path for the userpass auth method.
D. Option D is correct because it uses the proper write operation against the auth/userpass/users/sally endpoint, includes the password parameter, and assigns the required power-users policy to the new user.
Key Concept:
When using the Vault userpass auth method, new users are created by writing user configuration including the password and assigned policies to the auth//users/ endpoint.
References:
Userpass Auth Method, HashiCorp Vault Documentation, https://developer.hashicorp.com/vault/docs/auth/userpass
Vault CLI Write Command, HashiCorp Vault Documentation, https://developer.hashicorp.com/vault/docs/commands/write