Hashicorp Certified Vault Associate 002 · Free Practice Question Easy

Question 6

Vault is configured with the oidc auth method and you need to log in using the CLI. What command would you use to authenticate so you can make configuration changes to Vault?

  • A

    vault login -method=oidc username=bryan

  • B

    vault login auth/oidc/users/bryan

  • C

    vault auth oidc

  • D

    vault login username=bryan

Reveal correct answer

Correct answer: A

Explanation

To authenticate using the CLI, you could use the command vault login and specify the auth method you wish to use by using the -method flag. For example, if you wanted to authenticate using OIDC, you could use vault login -method=oidc username-bryan.krausen.

The other options are not valid.

Information about the vault login command can be found here.

A.

The correct command to authenticate using the oidc auth method in Vault is vault login -method=oidc username=bryan. This command specifies the authentication method as oidc and provides the username for logging in, allowing you to make configuration changes to Vault.

B.

The command vault login auth/oidc/users/bryan is not the correct way to authenticate using the oidc auth method in Vault. The correct syntax for logging in with the oidc auth method involves using the vault login -method=oidc username=bryan command to specify the authentication method and provide the username for logging in.

C.

The command vault auth oidc is the command used to manage the oidc auth method in Vault, not to authenticate and log in with the specified username for making configuration changes. It is used for setting up the oidc authentication method, not for logging in.

D.

The command vault login username=bryan is not the correct syntax for logging in with the oidc auth method in Vault. The correct format for logging in with the oidc auth method requires specifying the method as oidc and providing the username as a parameter, which is missing in this command.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need