VAULT-ASSOCIATE-002 · Question #14
To make an authenticated request via the Vault HTTP API, which header would you use?
The correct answer is A. The X-Vault-Token HTTP Header. Authenticated requests to the Vault HTTP API require including the X-Vault-Token HTTP header, which carries the client's authentication token.
Question
Options
- AThe X-Vault-Token HTTP Header
- BThe HTTP Header
- CThe Content-Type HTTP Header
- DThe X-Vault-Namespace HTTP Header
How the community answered
(25 responses)- A88% (22)
- B8% (2)
- D4% (1)
Why each option
Authenticated requests to the Vault HTTP API require including the `X-Vault-Token` HTTP header, which carries the client's authentication token.
For authenticated requests to the Vault HTTP API, clients must include their Vault token in the `X-Vault-Token` HTTP header to prove their identity and authorize their actions against Vault.
The 'HTTP Header' is too generic and not a specific header name for authentication.
The `Content-Type` HTTP Header specifies the media type of the resource being sent (e.g., application/json) but is not used for authentication.
The `X-Vault-Namespace` HTTP Header is used to specify the namespace for the request in Vault Enterprise, not for authentication.
Concept tested: Vault HTTP API authentication, X-Vault-Token
Source: https://developer.hashicorp.com/vault/api-docs#authentication
Topics
Community Discussion
No community discussion yet for this question.