HCVA0-003 practice question 7 of 35

Which two interfaces automatically assume the token for subsequent requests after successfully authenticating? (Select two)

Full set: 285 questions
Answer options
A: CLI Correct answer
B: API
C: UI Correct answer
Correct Answer:
A. CLI; C. UI
Explanation

The Hahicorp Vault Command Line Interface (CLI) and User Interface (UI) are designed as high-level clients that simplify user interaction. After a user authenticates, both interfaces automatically manage the session token. The CLI stores the token locally (typically in ~/.vault-token) and includes it in all subsequent commands. Similarly, the web UI stores the token within the browser's session (e.g., a cookie or local storage) and automatically attaches it to subsequent API calls made as the user navigates the interface. This behavior abstracts the token management process from the end-user for a seamless experience.

Why Incorrect

B. API: The API is a programmatic interface. It requires the client application to explicitly manage the token and include it in the X-Vault-Token header for every authenticated request. The API itself does not automatically persist or assume a token.

References

1. HashiCorp Vault Official Documentation, "vault login" Command: "The vault login command authenticates a user or machine with Vault... By default, the resulting token is stored in ~/.vault-token. Subsequent Vault commands will read this token for authentication." This confirms the CLI's automatic token handling for subsequent requests.

2. HashiCorp Vault Official Documentation, "API Documentation - Authentication": "To authenticate, a client must provide a Vault token. A token can be provided via the X-Vault-Token HTTP header. This is the preferred method." This documentation specifies that the client is responsible for providing the token for each API call, demonstrating it is not an automatic process from the API's perspective.

3. HashiCorp Vault Official Documentation, "UI": "The Vault UI allows you to log in using any of the configured authentication methods." While not explicitly detailing the token mechanism, this describes a standard web application login flow where the browser session manages the authentication token for subsequent user actions within the UI, which is a form of automatic token assumption.

Scroll to Top