VAULT-ASSOCIATE-002 · Question #74
VAULT-ASSOCIATE-002 Question #74: Real Exam Question with Answer & Explanation
The correct answer is A: vault kv put secret/my-secrets/my-password 53cr3t. The command vault kv put secret/my-secrets/my-password 53cr3t correctly creates a secret named 'my-password' with the value '53cr3t' at the specified path.
Question
What command creates a secret with the key "my-password" and the value "53cr3t" at path "my- secrets" within the KV secrets engine mounted at "secret"?
Options
- Avault kv put secret/my-secrets/my-password 53cr3t
- Bvault kv write secret/my-secrets/my-password 53cr3t
- Cvault kv write 53cr3t my-secrets/my-password
- Dvault kv put secret/my-secrets my-password-53cr3t
Explanation
The command vault kv put secret/my-secrets/my-password 53cr3t correctly creates a secret named 'my-password' with the value '53cr3t' at the specified path.
Common mistakes.
- B. While
vault kv writecan be used, the provided syntax for assigning a key-value pair as described is less standard thanvault kv putfor directly setting a single secret value. - C. The command order is incorrect;
vault kv writeexpects the path before the key-value arguments, not the value first. - D. This command would create a secret at
secret/my-secretswith its defaultvaluefield set tomy-password-53cr3t, rather than creating a key named "my-password" with the value "53cr3t".
Concept tested. Vault KV secret creation syntax (KVv1)
Reference. https://developer.hashicorp.com/vault/docs/commands/kv/put
Topics
Community Discussion
No community discussion yet for this question.