VAULT-ASSOCIATE-002 · Question #70
What is the Vault CLI command to query information about the token the client is currently using?
The correct answer is B. vault token lookup. The vault token lookup command without arguments is used to retrieve detailed information about the Vault token currently being utilized by the client.
Question
Options
- Avault lookup token
- Bvault token lookup
- Cvault lookup self
- Dvault self lookup
How the community answered
(33 responses)- B94% (31)
- C3% (1)
- D3% (1)
Why each option
The `vault token lookup` command without arguments is used to retrieve detailed information about the Vault token currently being utilized by the client.
`vault lookup token` is not a valid Vault CLI command structure; the correct subcommand order for token inspection is `token lookup`.
The `vault token lookup` command is specifically designed to inspect a Vault token. When run without arguments (or with the argument `self`), it displays details about the token currently configured in the CLI's environment, such as its policies, creation time, and remaining TTL.
`vault lookup self` is an incorrect command structure; while `self` is a valid argument for `vault token lookup`, `lookup` is not a top-level command here.
`vault self lookup` is not a valid Vault CLI command structure; the correct command sequence to inspect the current token is `vault token lookup`.
Concept tested: Vault CLI token inspection
Source: https://developer.hashicorp.com/vault/docs/commands/token/lookup
Topics
Community Discussion
No community discussion yet for this question.