ExamGecko
Home Home / HashiCorp / Vault Associate 002

HashiCorp Vault Associate 002 Practice Test - Questions Answers

Question list
Search
Search

The following three policies exist in Vault. What do these policies allow an organization to do?

A.
Separates permissions allowed on actions associated with the transit secret engine
A.
Separates permissions allowed on actions associated with the transit secret engine
Answers
B.
Nothing, as the minimum permissions to perform useful tasks are not present
B.
Nothing, as the minimum permissions to perform useful tasks are not present
Answers
C.
Encrypt, decrypt, and rewrap data using the transit engine all in one policy
C.
Encrypt, decrypt, and rewrap data using the transit engine all in one policy
Answers
D.
Create a transit encryption key for encrypting, decrypting, and rewrapping encrypted data
D.
Create a transit encryption key for encrypting, decrypting, and rewrapping encrypted data
Answers
Suggested answer: C

Explanation:

The three policies that exist in Vault are:

admins: This policy grants full access to all secrets and operations in Vault. It can be used by administrators or operators who need to manage all aspects of Vault.

default: This policy grants access to all secrets and operations in Vault except for those that require specific policies. It can be used as a fallback policy when no other policy matches.

transit: This policy grants access only to the transit secrets engine, which handles cryptographic functions on data in-transit. It can be used by applications or services that need to encrypt or decrypt data using Vault.

These policies allow an organization to perform useful tasks such as:

Encrypting, decrypting, and rewrapping data using the transit engine all in one policy: This policy grants access to both the transit secrets engine and the default policy, which allows performing any operation on any secret in Vault.

Creating a transit encryption key for encrypting, decrypting, and rewrapping encrypted data: This policy grants access only to the transit secrets engine and its associated keys, which are used for encrypting and decrypting data in transit using AES-GCM with a 256-bit AES key or other supported key types.

Separating permissions allowed on actions associated with the transit secret engine: This policy grants access only to specific actions related to the transit secrets engine, such as creating keys or wrapping requests. It does not grant access to other operations or secrets in Vault.

Your DevOps team would like to provision VMs in GCP via a CICD pipeline. They would like to integrate Vault to protect the credentials used by the tool. Which secrets engine would you recommend?

A.
Google Cloud Secrets Engine
A.
Google Cloud Secrets Engine
Answers
B.
Identity secrets engine
B.
Identity secrets engine
Answers
C.
Key/Value secrets engine version 2
C.
Key/Value secrets engine version 2
Answers
D.
SSH secrets engine
D.
SSH secrets engine
Answers
Suggested answer: A

Explanation:

The Google Cloud Secrets Engine is the best option for the DevOps team to provision VMs in GCP via a CICD pipeline and integrate Vault to protect the credentials used by the tool. The Google Cloud Secrets Engine can dynamically generate GCP service account keys or OAuth tokens based on IAM policies, which can be used to authenticate and authorize the CICD tool to access GCP resources. The credentials are automatically revoked when they are no longer used or when the lease expires, ensuring that the credentials are short-lived and secure. The DevOps team can configure rolesets or static accounts in Vault to define the scope and permissions of the credentials, and use the Vault API or CLI to request credentials on demand.The Google Cloud Secrets Engine also supports generating access tokens for impersonated service accounts, which can be useful for delegating access to other service accounts without storing or managing their keys1.

The Identity Secrets Engine is not a good option for this use case, because it does not generate GCP credentials, but rather generates identity tokens that can be used to access other Vault secrets engines or namespaces2.The Key/Value Secrets Engine version 2 is also not a good option, because it does not generate dynamic credentials, but rather stores and manages static secrets that the user provides3.The SSH Secrets Engine is not a good option either, because it does not generate GCP credentials, but rather generates SSH keys or OTPs that can be used to access remote hosts via SSH4.

Google Cloud - Secrets Engines | Vault | HashiCorp Developer

Identity - Secrets Engines | Vault | HashiCorp Developer

KV - Secrets Engines | Vault | HashiCorp Developer

SSH - Secrets Engines | Vault | HashiCorp Developer

What does the following policy do?

A.
Grants access for each user to a KV folder which shares their id
A.
Grants access for each user to a KV folder which shares their id
Answers
B.
Grants access to a special system entity folder
B.
Grants access to a special system entity folder
Answers
C.
Allows a user to read data about the secret endpoint identity
C.
Allows a user to read data about the secret endpoint identity
Answers
D.
Nothing, this is not a valid policy
D.
Nothing, this is not a valid policy
Answers
Suggested answer: C

Explanation:

This policy allows a user to read data about the secret endpoint identity. The policy grants the user the ability to create, update, read, and delete data in the ''secret/data/{identity.entity.id}'' path. Additionally, the user is allowed to list data in the ''secret/metadata/{identity.entity.id}'' path. This policy is useful for users who need to access information about the secret endpoint identity.

The secret endpoint identity is a feature of the Identity Secrets Engine, which allows Vault to generate identity tokens that can be used to access other Vault secrets engines or namespaces. The identity tokens are based on the entity and group information of the user or machine that authenticates with Vault. The entity is a unique identifier for the user or machine, and the group is a collection of entities that share some common attributes. The identity tokens can carry metadata and policies that are associated with the entity and group.

The ''secret/data/{identity.entity.id}'' path is where the user can store and retrieve data that is related to the secret endpoint identity. For example, the user can store some configuration or preferences for the secret endpoint identity in this path. The ''secret/metadata/{identity.entity.id}'' path is where the user can list the metadata of the data stored in the ''secret/data/{identity.entity.id}'' path. For example, the user can list the version, creation time, deletion time, and destroy time of the data in this path.

[Identity - Secrets Engines | Vault | HashiCorp Developer]

[KV - Secrets Engines | Vault | HashiCorp Developer]

To make an authenticated request via the Vault HTTP API, which header would you use?

A.
The X-Vault-Token HTTP Header
A.
The X-Vault-Token HTTP Header
Answers
B.
The x-Vault-Request HTTP Header
B.
The x-Vault-Request HTTP Header
Answers
C.
The Content-Type HTTP Header
C.
The Content-Type HTTP Header
Answers
D.
The X-Vault-Namespace HTTP Header
D.
The X-Vault-Namespace HTTP Header
Answers
Suggested answer: A

Explanation:

To make an authenticated request via the Vault HTTP API, you need to use the X-Vault-Token HTTP Header or the Authorization HTTP Header using the Bearer <token> scheme. The token is a string that represents your identity and permissions in Vault. You can obtain a token by using an authentication method, such as userpass, approle, aws, etc. The token can also be a root token, which has unlimited access to Vault, or a wrapped token, which is a response-wrapping token that can be used to unwrap the actual token. The token must be sent with every request to Vault that requires authentication, except for the unauthenticated endpoints, such as sys/init, sys/seal-status, sys/unseal, etc.The token is used by Vault to verify your identity and enforce the policies that grant or deny access to various paths and operations.Reference: https://developer.hashicorp.com/vault/api-docs3, https://developer.hashicorp.com/vault/docs/concepts/tokens4, https://developer.hashicorp.com/vault/docs/concepts/auth5

Which of the following are replication methods available in Vault Enterprise? Choose two correct answers.

A.
Cluster sharding
A.
Cluster sharding
Answers
B.
Namespaces
B.
Namespaces
Answers
C.
Performance Replication
C.
Performance Replication
Answers
D.
Disaster Recovery Replication
D.
Disaster Recovery Replication
Answers
Suggested answer: C, D

Explanation:

The replication methods available in Vault Enterprise are performance replication and disaster recovery replication. These methods allow critical data to be replicated across clusters to support horizontally scaling and disaster recovery workloads.

Performance replication enables a primary cluster to replicate data to one or more secondary clusters, which can handle client requests and improve performance and availability. Performance replication replicates most Vault data, such as secrets, policies, auth methods, and leases, but not tokens. Performance secondaries generate their own tokens and leases, which are not replicated back to the primary. Performance replication also supports filtering, which allows selective replication of data based on namespaces or paths.

Disaster recovery replication enables a primary cluster to replicate data to one or more secondary clusters, which act as standby clusters in case of a failure or outage of the primary. Disaster recovery replication replicates all Vault data, including tokens and leases, and maintains the same configuration and state as the primary. Disaster recovery secondaries do not handle client requests, but they can be promoted to a primary in a disaster recovery scenario.Reference:Replication - Vault Enterprise | Vault | HashiCorp Developer,Performance Replication - Vault Enterprise | Vault | HashiCorp Developer,Disaster Recovery Replication - Vault Enterprise | Vault | HashiCorp Developer

When an auth method is disabled all users authenticated via that method lose access.

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

Explanation:

The statement is true. When an auth method is disabled, all users authenticated via that method lose access. This is because the tokens issued by the auth method are automatically revoked when the auth method is disabled. This prevents the users from performing any operation in Vault using the revoked tokens. To regain access, the users have to authenticate again using a different auth method that is enabled and has the appropriate policies attached.Reference:Auth Methods | Vault | HashiCorp Developer,auth disable - Command | Vault | HashiCorp Developer

Which of these is not a benefit of dynamic secrets?

A.
Supports systems which do not natively provide a method of expiring credentials
A.
Supports systems which do not natively provide a method of expiring credentials
Answers
B.
Minimizes damage of credentials leaking
B.
Minimizes damage of credentials leaking
Answers
C.
Ensures that administrators can see every password used
C.
Ensures that administrators can see every password used
Answers
D.
Replaces cumbersome password rotation tools and practices
D.
Replaces cumbersome password rotation tools and practices
Answers
Suggested answer: C

Explanation:

Dynamic secrets are generated on-demand by Vault and have a limited time-to-live (TTL). They do not ensure that administrators can see every password used, as they are often encrypted and ephemeral. The benefits of dynamic secrets are:

They support systems that do not natively provide a method of expiring credentials, such as databases, cloud providers, SSH, etc. Vault can revoke the credentials when they are no longer needed or when the lease expires.

They minimize the damage of credentials leaking, as they are short-lived and can be easily rotated or revoked. If a credential is compromised, the attacker has a limited window of opportunity to use it before it becomes invalid.

They replace cumbersome password rotation tools and practices, as Vault can handle the generation and revocation of credentials automatically and securely. This reduces the operational overhead and complexity of managing secrets.

Which of the following cannot define the maximum time-to-live (TTL) for a token?

A.
By the authentication method t natively provide a method of expiring credentials
A.
By the authentication method t natively provide a method of expiring credentials
Answers
B.
By the client system f credentials leaking
B.
By the client system f credentials leaking
Answers
C.
By the mount endpoint configuration very password used
C.
By the mount endpoint configuration very password used
Answers
D.
A parent token TTL e password rotation tools and practices
D.
A parent token TTL e password rotation tools and practices
Answers
E.
System max TTL
E.
System max TTL
Answers
Suggested answer: B

Explanation:

The maximum time-to-live (TTL) for a token is defined by the lowest value among the following factors:

The authentication method that issued the token. Each auth method can have a default and a maximum TTL for the tokens it generates. These values can be configured by the auth method's mount options or by the auth method's specific endpoints.

The mount endpoint configuration that the token is accessing. Each secrets engine can have a default and a maximum TTL for the leases it grants. These values can be configured by the secrets engine's mount options or by the secrets engine's specific endpoints.

A parent token TTL. If a token is created by another token, it inherits the remaining TTL of its parent token, unless the parent token has an infinite TTL (such as the root token). A child token cannot outlive its parent token.

System max TTL. This is a global limit for all tokens and leases in Vault. It can be configured by the system backend's max_lease_ttl option.

The client system that uses the token cannot define the maximum TTL for the token, as this is determined by Vault's configuration and policies. The client system can only request a specific TTL for the token, but this request is subject to the limits imposed by the factors above.

What are orphan tokens?

A.
Orphan tokens are tokens with a use limit so you can set the number of uses when you create them
A.
Orphan tokens are tokens with a use limit so you can set the number of uses when you create them
Answers
B.
Orphan tokens are not children of their parent; therefore, orphan tokens do not expire when their parent does
B.
Orphan tokens are not children of their parent; therefore, orphan tokens do not expire when their parent does
Answers
C.
Orphan tokens are tokens with no policies attached
C.
Orphan tokens are tokens with no policies attached
Answers
D.
Orphan tokens do not expire when their own max TTL is reached
D.
Orphan tokens do not expire when their own max TTL is reached
Answers
Suggested answer: D

Explanation:

Orphan tokens are tokens that are root of their own token tree. This means that they do not have any parent token associated with them, and they do not expire when their parent token expires. Orphan tokens are useful for scenarios where you need a short-lived and independent token, such as for testing or debugging purposes. Orphan tokens can also be used to create temporary access tokens for applications or services that need to communicate with Vault without using a long-lived root token.Reference:Tokens | Vault | HashiCorp Developer,Vault cli: how to create orphan token with role - HashiCorp Discuss

To give a role the ability to display or output all of the end points under the /secrets/apps/* end point it would need to have which capability set?

A.
update
A.
update
Answers
B.
read
B.
read
Answers
C.
sudo
C.
sudo
Answers
D.
list
D.
list
Answers
E.
None of the above
E.
None of the above
Answers
Suggested answer: C

Explanation:

To give a role the ability to display or output all of the end points under the /secrets/apps/* end point, it would need to have the list capability set. The list capability allows a role to perform any operation on any path in Vault, including reading, writing, deleting, and listing. The list capability is required for roles that need to access sensitive data or perform administrative tasks in Vault. The other capabilities are not relevant for this scenario, as they only allow specific operations on specific paths or secrets engines.Reference:Policies | Vault | HashiCorp Developer,token capabilities - Command | Vault | HashiCorp Developer

Total 57 questions
Go to page: of 6