ExamGecko
Home Home / HashiCorp / Vault Associate 002

HashiCorp Vault Associate 002 Practice Test - Questions Answers, Page 2

Question list
Search
Search

You are using the Vault userpass auth method mounted at auth/userpass. How do you create a new user named 'sally' with password 'h0wN0wB4r0wnC0w'? This new user will need the power-users policy.

A.
A.
Answers
B.
B.
Answers
C.
C.
Answers
D.
D.
Answers
Suggested answer: D

Explanation:

To create a new user named ''sally'' with password ''h0wN0wB4r0wnC0w'' and the power-users policy, you would use the Vault userpass auth method mounted at auth/userpass. You would use the following command: ''vault write auth/userpass/users/sally password=h0wN0wB4r0wnC0w policies=power-users''. This command would create a new user named ''sally'' with the specified password and policy.Reference:

[Userpass Auth Method | Vault | HashiCorp Developer]

[Create Vault policies | Vault | HashiCorp Developer]

The vault lease renew command increments the lease time from:

A.
The current time
A.
The current time
Answers
B.
The end of the lease
B.
The end of the lease
Answers
Suggested answer: A

Explanation:

The vault lease renew command increments the lease time from the current time, not the end of the lease. This means that the user can request a specific amount of time they want remaining on the lease, termed the increment. This is not an increment at the end of the current TTL; it is an increment from the current time. For example, vault lease renew -increment=3600 my-lease-id would request that the TTL of the lease be adjusted to 1 hour (3600 seconds) from now. Having the increment be rooted at the current time instead of the end of the lease makes it easy for users to reduce the length of leases if they don't actually need credentials for the full possible lease period, allowing those credentials to expire sooner and resources to be cleaned up earlier. The requested increment is completely advisory.The backend in charge of the secret can choose to completely ignore it1.Reference:

Lease, Renew, and Revoke | Vault | HashiCorp Developer

HOTSPOT

Where do you define the Namespace to log into using the Vault Ul?

To answer this question

Use your mouse to click on the screenshot in the location described above. An arrow indicator will mark where you have clicked. Click the 'Answer' button once you have positioned the arrow to answer the question. You may need to scroll down to see the entire screenshot.


Question 13
Correct answer: Question 13

You have a 2GB Base64 binary large object (blob) that needs to be encrypted. Which of the following best describes the transit secrets engine?

A.
A data key encrypts the blob locally, and the same key decrypts the blob locally.
A.
A data key encrypts the blob locally, and the same key decrypts the blob locally.
Answers
B.
To process such a large blob. Vault will temporarily store it in the storage backend.
B.
To process such a large blob. Vault will temporarily store it in the storage backend.
Answers
C.
Vault will store the blob permanently. Be sure to run Vault on a compute optimized machine
C.
Vault will store the blob permanently. Be sure to run Vault on a compute optimized machine
Answers
D.
The transit engine is not a good solution for binaries of this size.
D.
The transit engine is not a good solution for binaries of this size.
Answers
Suggested answer: D

Explanation:

The transit secrets engine is not a good solution for binaries of this size, because it is designed to handle cryptographic functions on data in-transit, not data at-rest. The transit secrets engine does not store any data sent to it, so it would require sending the entire 2GB blob to Vault for encryption or decryption, which would be inefficient and impractical. A better solution would be to use the transit secrets engine to generate a data key, which is a high-entropy key that can be used to encrypt or decrypt data locally. The data key can be returned in plaintext or wrapped by another key, depending on the use case. This way, the transit secrets engine only handles the encryption or decryption of the data key, not the data itself, and the data can be stored in any primary data store.Reference:Transit - Secrets Engines | Vault | HashiCorp Developer,Encryption as a service: transit secrets engine | Vault | HashiCorp Developer

How would you describe the value of using the Vault transit secrets engine?

A.
Vault has an API that can be programmatically consumed by applications
A.
Vault has an API that can be programmatically consumed by applications
Answers
B.
The transit secrets engine ensures encryption in-transit and at-rest is enforced enterprise wide
B.
The transit secrets engine ensures encryption in-transit and at-rest is enforced enterprise wide
Answers
C.
Encryption for application data is best handled by a storage system or database engine, while storing encryption keys in Vault
C.
Encryption for application data is best handled by a storage system or database engine, while storing encryption keys in Vault
Answers
D.
The transit secrets engine relieves the burden of proper encryption/decryption from application developers and pushes the burden onto the operators of Vault
D.
The transit secrets engine relieves the burden of proper encryption/decryption from application developers and pushes the burden onto the operators of Vault
Answers
Suggested answer: D

Explanation:

The transit secrets engine relieves the burden of proper encryption/decryption from application developers and pushes the burden onto the operators of Vault. The transit secrets engine provides encryption as a service, which means that it performs cryptographic operations on data in-transit without storing any data. This allows developers to delegate the responsibility of managing encryption keys and algorithms to Vault operators, who can define and enforce policies on the transit secrets engine. This way, developers can focus on their application logic and data, while Vault handles the encryption and decryption of data in a secure and scalable manner.Reference:Transit - Secrets Engines | Vault | HashiCorp Developer,Encryption as a service: transit secrets engine | Vault | HashiCorp Developer

What is the Vault CLI command to query information about the token the client is currently using?

A.
vault lookup token
A.
vault lookup token
Answers
B.
vault token lookup
B.
vault token lookup
Answers
C.
vault lookup self
C.
vault lookup self
Answers
D.
vault self-lookup
D.
vault self-lookup
Answers
Suggested answer: B

Explanation:

The Vault CLI command to query information about the token the client is currently using is vault token lookup. This command displays information about the token or accessor provided as an argument, or the locally authenticated token if no argument is given. The information includes the token ID, accessor, policies, TTL, creation time, and metadata. This command can be useful for debugging and auditing purposes, as well as for renewing or revoking tokens.Reference:token lookup - Command | Vault | HashiCorp Developer,Tokens | Vault | HashiCorp Developer

Which of the following is a machine-oriented Vault authentication backend?

A.
Okta
A.
Okta
Answers
B.
AppRole
B.
AppRole
Answers
C.
Transit
C.
Transit
Answers
D.
GitHub
D.
GitHub
Answers
Suggested answer: B

Explanation:

AppRole is a machine-oriented authentication method that allows machines or applications to authenticate with Vault using a role ID and a secret ID. The role ID is a unique identifier for the application, and the secret ID is a single-use credential that can be delivered to the application securely.AppRole is designed to provide secure introduction of machines and applications to Vault, and to support the principle of least privilege by allowing fine-grained access control policies to be attached to each role1.

Okta, GitHub, and Transit are not machine-oriented authentication methods.Okta and GitHub are user-oriented authentication methods that allow users to authenticate with Vault using their Okta or GitHub credentials23.Transit is not an authentication method at all, but a secrets engine that provides encryption as a service4.

AppRole Auth Method | Vault | HashiCorp Developer

Okta Auth Method | Vault | HashiCorp Developer

GitHub Auth Method | Vault | HashiCorp Developer

Transit Secrets Engine | Vault | HashiCorp Developer

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

A.
generate-password | vault kv put secret/password value
A.
generate-password | vault kv put secret/password value
Answers
B.
vault kv put secret/password value-itsasecret
B.
vault kv put secret/password value-itsasecret
Answers
C.
vault kv put secret/password [email protected]
C.
vault kv put secret/password [email protected]
Answers
D.
vault kv put secret/password value-SSECRET_VALUE
D.
vault kv put secret/password value-SSECRET_VALUE
Answers
Suggested answer: B

Explanation:

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 [email protected] 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]

You can build a high availability Vault cluster with any storage backend.

A.
True
A.
True
Answers
B.
False
B.
False
Answers
Suggested answer: B

Explanation:

Not all storage backends support high availability mode for Vault. Only the storage backends that support locking can enable Vault to run in a multi-server mode where one server is active and the others are standby. Some examples of storage backends that support high availability mode are Consul, Integrated Storage, and ZooKeeper.Some examples of storage backends that do not support high availability mode are Filesystem, MySQL, and PostgreSQL.Reference: https://developer.hashicorp.com/vault/docs/concepts/ha1, https://developer.hashicorp.com/vault/docs/configuration/storage2

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'?

A.
vault kv put secret/my-secrets/my-password 53cr3t
A.
vault kv put secret/my-secrets/my-password 53cr3t
Answers
B.
vault kv write secret/my-secrets/my-password 53cr3t
B.
vault kv write secret/my-secrets/my-password 53cr3t
Answers
C.
vault kv write 53cr3t my-secrets/my-password
C.
vault kv write 53cr3t my-secrets/my-password
Answers
D.
vault kv put secret/my-secrets y-password-53cr3t
D.
vault kv put secret/my-secrets y-password-53cr3t
Answers
Suggested answer: A

Explanation:

The vault kv put command writes the data to the given path in the K/V secrets engine. The command requires the mount path of the K/V secrets engine, the secret path, and the key-value pair to store. The mount path can be specified with the -mount flag or as part of the secret path. The key-value pair can be given as an argument or read from a file or stdin. The correct syntax for the command is:

vault kv put -mount=secret my-secrets/my-password 53cr3t

or

vault kv put secret/my-secrets my-password=53cr3t

The other options are incorrect because they use the deprecated vault kv write command, or they have the wrong order or format of the arguments.Reference: https://developer.hashicorp.com/vault/docs/commands/kv/put3, https://developer.hashicorp.com/vault/docs/commands/kv4

Total 57 questions
Go to page: of 6