VAULT-ASSOCIATE-002 · Question #98
Which statement describes the results of this command: vault kv list secret/test?
The correct answer is B. List the existing key names at the "secret/test" path. The vault kv list secret/test command is used to display the names of all keys and sub-paths directly present under the specified secret/test path within a KV secrets engine.
Question
Options
- ACheck the status of a specific key/value secrets engine
- BList the existing key names at the "secret/test" path
- COutput all key/value secrets engines
- DOutput all key names from all key/value secrets engine
How the community answered
(62 responses)- A3% (2)
- B89% (55)
- C6% (4)
- D2% (1)
Why each option
The `vault kv list secret/test` command is used to display the names of all keys and sub-paths directly present under the specified `secret/test` path within a KV secrets engine.
`vault kv list` does not check the status of a secrets engine; it is used for listing keys. To check the status of secrets engines, one would typically use `vault secrets list`.
The `vault kv list` command is specifically designed to enumerate the keys and sub-paths that exist directly at the provided logical path within the mounted KV secrets engine. In this case, it will show everything immediately beneath `secret/test`.
This command does not output all key/value secrets engines; it operates within a single mounted KV engine at the specified path, listing its contents.
This command does not output all key names from all key/value secrets engines; its scope is limited to the `secret/test` path within the default or specified KV engine.
Concept tested: Vault KV secrets engine listing keys
Source: https://developer.hashicorp.com/vault/docs/commands/vault_kv#list
Topics
Community Discussion
No community discussion yet for this question.