Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

HashiCorp Exam Vault-Associate Topic 2 Question 41 Discussion

Actual exam question for HashiCorp's Vault-Associate exam
Question #: 41
Topic #: 2
[All Vault-Associate Questions]

Security requirements demand that no secrets appear in the shell history. Which command does not meet this requirement?

Show Suggested Answer Hide Answer
Suggested Answer: B

The command that does not meet the security requirement of not having secrets appear in the shell history is B. vault kv put secret/password value-itsasecret. This command would store the secret value ''itsasecret'' in the key/value secrets engine at the path secret/password, but it would also expose the secret value in the shell history, which could be accessed by other users or malicious actors. This is not a secure way of storing secrets in Vault.

The other commands are more secure ways of storing secrets in Vault without revealing them in the shell history. A. generate-password | vault kv put secret/password value would use a pipe to pass the output of the generate-password command, which could be a script or a tool that generates a random password, to the vault kv put command, which would store the password in the key/value secrets engine at the path secret/password. The password would not be visible in the shell history, only the commands. C. vault kv put secret/password value=@data.txt would use the @ syntax to read the secret value from a file named data.txt, which could be encrypted or protected by file permissions, and store it in the key/value secrets engine at the path secret/password. The file name would be visible in the shell history, but not the secret value. D. vault kv put secret/password value-SSECRET_VALUE would use the -S syntax to read the secret value from the environment variable SECRET_VALUE, which could be set and unset in the shell session, and store it in the key/value secrets engine at the path secret/password. The environment variable name would be visible in the shell history, but not the secret value.


[Write Secrets | Vault | HashiCorp Developer]

Contribute your Thoughts:

Annamae
16 hours ago
I'd say Option D is the safest bet here. Keeping the secret value separate from the command is the way to go.
upvoted 0 times
...
Fernanda
17 days ago
I believe option A is also not secure because it generates a password that might be stored in the shell history.
upvoted 0 times
...
Jeannetta
17 days ago
Option B is definitely not the way to go. Putting a secret in the shell history is a big no-no.
upvoted 0 times
Cordie
11 days ago
User 1: Option B is a big no-no. Can't have secrets in the shell history.
upvoted 0 times
...
...
Odette
29 days ago
I agree with Val. Option B is not secure because it exposes the secret in the shell history.
upvoted 0 times
...
Val
30 days ago
I think option B does not meet the security requirement because it includes the word 'secret' in the value.
upvoted 0 times
...

Save Cancel