CertSafari

    Free HashiCorp Vault Associate Sample Questions

    35 free sample questions from our bank of 357+, covering every exam domain, with answers and detailed explanations. Updated August 2026.

    Domain 1: Authentication methods

    Subdomain 1.2: Choose an authentication method based on use case

    1.A small development team uses GitHub for version control. They want a simple way to authenticate to Vault using their existing GitHub personal access tokens to read secrets. Which authentication method is most appropriate?

    1. A.GitHub
    2. B.OIDC
    3. C.Userpass
    4. D.AppRole
    Show answer & explanation

    Correct answer: AGitHub

    • A. Correct. The GitHub auth method is specifically designed to allow users to authenticate to Vault using their GitHub personal access tokens. It integrates seamlessly with existing GitHub workflows by mapping GitHub organizations and teams to Vault policies, making it the most straightforward solution for this team.
    • B. Incorrect. OIDC (OpenID Connect) is typically used for federated identity management and involves a browser-based login flow. While GitHub can act as an identity provider, it is more complex to set up than the native GitHub auth method and is not designed to consume existing personal access tokens directly for authentication.
    • C. Incorrect. The Userpass auth method involves managing unique usernames and passwords within Vault itself. This would require the team to manage a second set of credentials rather than leveraging their existing GitHub tokens.
    • D. Incorrect. AppRole is the primary method for machine-to-machine authentication, involving RoleIDs and SecretIDs. It is not intended for human users looking for a simple way to authenticate using their version control system credentials.

    Subdomain 1.4: Define the purpose of identities and groups

    2.What is the primary purpose of an Entity in the Vault Identity secrets engine?

    1. A.To map multiple authentication methods to a single logical user.
    2. B.To provide a mechanism for Vault to authenticate against external identity providers.
    3. C.To store static credentials for database access.
    4. D.To define the maximum time-to-live (TTL) for a given token.
    Show answer & explanation

    Correct answer: ATo map multiple authentication methods to a single logical user.

    • A. Correct. An Entity represents a single logical user in Vault. It serves as a container that links multiple aliases from various authentication methods (such as LDAP, GitHub, or AppRole) to one identity, allowing for unified identity management and policy application.
    • B. Incorrect. The task of authenticating against external identity providers is handled by Vault's various Authentication Methods (e.g., LDAP, OIDC). Entities are used to correlate these identities within Vault after authentication.
    • C. Incorrect. The Identity secrets engine is for managing user and group identities. Static or dynamic database credentials are managed by the Database secrets engine or the Key/Value secrets engine.
    • D. Incorrect. Token TTL (Time-To-Live) settings are governed by the authentication method configuration, mount-level tuning, or token roles, rather than the Identity Entity itself.

    Subdomain 1.1: Define the purpose of authentication methods

    3.What is the primary function of an authentication method in HashiCorp Vault?

    1. A.To encrypt data in transit between the client and the Vault server.
    2. B.To verify a client's identity and issue a Vault token.
    3. C.To define the access control rules and permissions for a user.
    4. D.To store static secrets such as database passwords and API keys.
    Show answer & explanation

    Correct answer: BTo verify a client's identity and issue a Vault token.

    • A. Incorrect. Encrypting data in transit is handled by TLS/SSL, not by Vault authentication methods. Authentication methods focus on proving identity rather than transport-level security.
    • B. Correct. The primary function of an authentication method in HashiCorp Vault is to verify a client's identity using a supported login mechanism and, upon successful verification, issue a Vault token that the client uses for subsequent requests.
    • C. Incorrect. Defining access control rules and permissions is the role of the authorization process (policies), not the authentication method. While auth methods map identities to policies, they do not define the rules themselves.
    • D. Incorrect. Storing static secrets like database passwords and API keys is the responsibility of secrets engines. Authentication methods are strictly used for identity verification and session establishment.

    Subdomain 1.6: Configure authentication methods using the API, CLI, and UI

    4.To view all currently enabled authentication methods and their configurations via the Vault API, an administrator must send an authenticated GET request to the ________ endpoint.

    1. A./sys/mounts/auth
    2. B./sys/auth
    3. C./auth/catalog
    Show answer & explanation

    Correct answer: B/sys/auth

    • A. Incorrect. The /sys/mounts endpoint is used specifically for managing and listing secret engine mounts. It is not used for authentication methods.
    • B. Correct. An authenticated GET request to the /sys/auth endpoint returns a list of all enabled authentication backends along with their configuration details, such as the mount point, type, and tuning information.
    • C. Incorrect. /auth/catalog is not a valid Vault API endpoint. Vault manages system-level configurations, including authentication methods, under the /sys/ prefix.

    Subdomain 1.5: Authenticate to Vault using the API, CLI, and UI

    5.When authenticating to Vault using the AppRole method via the HTTP API, which HTTP method must be used, and where should the `role_id` and `secret_id` be placed?

    1. A.GET request; parameters placed in the URL query string.
    2. B.POST request; parameters placed in the JSON request body.
    3. C.PUT request; parameters placed in the HTTP headers.
    4. D.POST request; parameters placed in the URL query string.
    Show answer & explanation

    Correct answer: BPOST request; parameters placed in the JSON request body.

    • A. Incorrect. GET requests are unsuitable for authentication because sensitive credentials like `role_id` and `secret_id` would be exposed in URL query strings, which are frequently logged by web servers, proxies, and browser history.
    • B. Correct. The AppRole authentication method via the HTTP API requires a POST request to the login endpoint (e.g., `/v1/auth/approle/login`). The `role_id` and `secret_id` must be securely transmitted within the JSON-formatted request body.
    • C. Incorrect. Vault uses the POST method for AppRole login, not PUT. Furthermore, the login credentials should be provided in the request payload rather than in custom HTTP headers.
    • D. Incorrect. While POST is the correct HTTP method, Vault's API specification for AppRole requires the credentials to be passed in the JSON body, not as URL query parameters.

    Subdomain 1.3: Explain the difference between human & system authentication methods

    6.Human authentication methods in Vault are primarily designed for interactive login by users, whereas system authentication methods are intended for automated services, applications, and machines.

    1. A.True
    2. B.False
    Show answer & explanation

    Correct answer: ATrue

    • A. The statement is true because human authentication methods (such as OIDC, LDAP, or userpass) are optimized for manual user interactions involving credentials or multi-factor authentication, while system methods (such as AppRole, Kubernetes, or AWS) are designed for non-interactive, automated machine-to-machine workflows.
    • B. The statement is false because system authentication methods are specifically engineered for machines and services to authenticate without human intervention, often using methods like API keys or service accounts, rather than interactive login flows intended for people.

    Domain 2: Vault policies

    Subdomain 2.1: Explain the value of Vault policies

    7.Your organization has 50 developers who authenticate to Vault using OIDC. Instead of managing policies for each individual developer's token, you want to manage their permissions centrally. How can Vault policies be applied to achieve this efficiently?

    1. A.By hardcoding the policies into the OIDC provider's configuration.
    2. B.By mapping the policies to an Identity Group and adding the developers' entity aliases to that group.
    3. C.By creating a single shared token with the required policies and distributing it to all developers.
    4. D.By attaching the policies directly to the Vault server's main configuration file.
    Show answer & explanation

    Correct answer: BBy mapping the policies to an Identity Group and adding the developers' entity aliases to that group.

    • A. Vault policies are managed within Vault itself, not the external OIDC provider. While identity providers handle authentication and provide identity assertions, the authorization logic and policy mapping are handled inside Vault's Identity engine.
    • B. Using Vault's Identity Groups is the recommended and most scalable method for managing permissions centrally. By assigning policies to a group and adding developers' entity aliases to that group, permissions are automatically inherited, simplifying administration for large numbers of users.
    • C. Distributing a single shared token is a critical security risk. It violates the principle of least privilege and makes it impossible to audit individual actions or revoke access for a single specific user without affecting everyone.
    • D. Vault policies are independent API objects managed via the CLI, API, or UI and stored in Vault's persistent storage. They are not defined or attached within the server's main HCL configuration file.

    Subdomain 2.3: Describe Vault policy: capabilities

    8.An administrator writes a Vault policy granting the `read` capability to the path `secret/data/team/+/config`. Based on Vault's path globbing rules, which of the following paths will this policy allow the user to read?

    1. A.It matches `secret/data/team/dev/config` but does not match `secret/data/team/dev/app/config`.
    2. B.It matches any path that starts with `secret/data/team/` and ends with `/config`, regardless of directory depth.
    3. C.It matches `secret/data/team/config` only, treating the `+` as a literal character.
    4. D.It matches `secret/data/team/dev/app/config` but does not match `secret/data/team/dev/config`.
    Show answer & explanation

    Correct answer: AIt matches `secret/data/team/dev/config` but does not match `secret/data/team/dev/app/config`.

    • A. Correct. In Vault path globbing, the `+` character matches exactly one path segment. In the path `secret/data/team/dev/config`, the string `dev` represents exactly one segment, making it a match. The path `secret/data/team/dev/app/config` fails because it has two segments (`dev/app`) where the policy only allows one.
    • B. Incorrect. The `+` character matches only a single path segment, not an arbitrary directory depth. Recursive matching across multiple directories is not supported by the `+` operator.
    • C. Incorrect. In the context of Vault policy paths, `+` is a special glob character and is not treated as a literal character unless escaped or used in a context where globbing is disabled.
    • D. Incorrect. This reverses the correct logic. `secret/data/team/dev/config` matches because it has a single segment in the `+` position, while `secret/data/team/dev/app/config` does not match because it contains two segments.

    Subdomain 2.2: Describe Vault policy: path

    9.A developer needs to read a secret stored in a KV version 2 secrets engine mounted at `app-secrets/`. The secret is named `db-credentials`. Which path must be specified in the policy to grant read access to the secret's payload?

    1. A.app-secrets/db-credentials
    2. B.app-secrets/data/db-credentials
    3. C.app-secrets/metadata/db-credentials
    4. D.app-secrets/read/db-credentials
    Show answer & explanation

    Correct answer: Bapp-secrets/data/db-credentials

    • A. Incorrect. In the KV version 2 secrets engine, the secret payload is not accessed directly at the root path of the mount (which was the standard for KV version 1). A specific API subpath must be included between the mount point and the secret name.
    • B. Correct. The KV version 2 secrets engine introduces a versioned API structure. To access the actual secret payload (the data itself), the path must include the 'data/' subpath. Therefore, the correct policy path is 'app-secrets/data/db-credentials'.
    • C. Incorrect. The 'metadata/' subpath is used for administrative tasks related to the secret, such as listing versions, updating metadata settings, or deleting all versions. It does not grant access to the actual secret key-value pairs (the payload).
    • D. Incorrect. There is no 'read/' subpath in the Vault KV version 2 API. Reading, writing, and updating a secret's payload are all performed through the 'data/' endpoint, with the specific action controlled by the policy capabilities (read, create, update).

    Subdomain 2.5: Configure Vault policies using the UI and CLI

    10.A new security engineer joins the team and wants to see all the custom policies currently configured in the Vault cluster. They have the appropriate permissions. Which CLI command should they run to retrieve this list?

    1. A.vault list policies
    2. B.vault policy list
    3. C.vault policy show
    4. D.vault get policies
    Show answer & explanation

    Correct answer: Bvault policy list

    • A. Incorrect. While Vault uses 'list' subcommands for many paths, the dedicated CLI command group for policies is 'vault policy'. The syntax 'vault list policies' does not map to a valid command.
    • B. Correct. The 'vault policy list' command is the standard CLI tool to retrieve and display the names of all configured policies in the Vault cluster.
    • C. Incorrect. The 'vault policy show' command is used to display the specific rules and contents of a single policy. It requires a policy name as an argument and cannot be used to list all policies.
    • D. Incorrect. 'vault get' is not a valid command for policy operations. Vault organizes policy management under the 'vault policy' command group.

    Subdomain 2.4: Choose a Vault policy based on requirements

    11.A developer needs to read secrets from a KV version 2 secrets engine mounted at `secret/`. The specific secret they need to access is located at `secret/app-config`. Which policy snippet grants the minimum required access to meet this requirement?

    1. A.path "secret/app-config" { capabilities = ["read"] }
    2. B.path "secret/data/app-config" { capabilities = ["read"] }
    3. C.path "secret/metadata/app-config" { capabilities = ["read"] }
    4. D.path "secret/read/app-config" { capabilities = ["read"] }
    Show answer & explanation

    Correct answer: Bpath "secret/data/app-config" { capabilities = ["read"] }

    • A. Incorrect. This path is incorrect for a KV version 2 secrets engine. In KV v2, the path to read a secret requires an internal 'data/' prefix; accessing the path directly at the mount point is the behavior for KV version 1.
    • B. Correct. In KV version 2, the actual secret data is accessed through the 'data/' path under the mount. Therefore, 'secret/data/app-config' is the correct policy path for reading the secret contents while adhering to the principle of least privilege.
    • C. Incorrect. The 'metadata/' path in KV v2 is used for managing secret metadata (such as version history, creation times, and deletion status) but does not provide access to the actual secret key-value pairs.
    • D. Incorrect. 'secret/read/app-config' is not a valid API path for the KV version 2 secrets engine. Vault uses specific reserved prefixes like 'data/', 'metadata/', and 'destroy/', but 'read/' is not one of them.

    Domain 3: Vault tokens

    Subdomain 3.6: Describe how to create tokens based on need

    12.To create a new root token when the original is lost, an administrator can simply run `vault token create -type=root` as long as they are authenticated with a token that has the `sudo` capability.

    1. A.True
    2. B.False
    Show answer & explanation

    Correct answer: BFalse

    • A. The statement is false because root tokens cannot be generated through standard token creation commands; creating a root token is a sensitive operation that requires a specialized workflow involving a quorum of unseal or recovery keys.
    • B. The statement is false because if a root token is lost, it must be regenerated using the `vault operator generate-root` process, which mandates a threshold of unseal/recovery key holders to participate, ensuring that sudo-level permissions alone cannot bypass Vault's security model for root access.

    Subdomain 3.5: Explain orphaned tokens

    13.To manually create an orphaned token using the Vault CLI, you would use the command `vault token create ________`.

    1. A.-no-parent
    2. B.-orphan
    3. C.-detached
    Show answer & explanation

    Correct answer: B-orphan

    • A. Incorrect. The `-no-parent` flag is not a valid option for the `vault token create` command. While the name implies the intended behavior, HashiCorp Vault specifically uses a different flag for this functionality.
    • B. Correct. The `-orphan` flag is the correct Vault CLI option used to create an orphaned token. An orphaned token has no parent, meaning it will not be revoked even if the token that created it is revoked.
    • C. Incorrect. The `-detached` flag is not a valid option for the `vault token create` command. Vault uses the `-orphan` flag to signify a token that exists independently of its creator's lifecycle.

    Subdomain 3.4: Explain the impact of time-to-live

    14.What is the primary security benefit of using a Time-to-Live (TTL) for a Vault token?

    1. A.It reduces the storage overhead on the Vault storage backend.
    2. B.It minimizes the window of opportunity for an attacker if the token is compromised.
    3. C.It prevents the token from being used to generate dynamic secrets.
    4. D.It automatically encrypts the token data in transit.
    Show answer & explanation

    Correct answer: BIt minimizes the window of opportunity for an attacker if the token is compromised.

    • A. Time-to-Live (TTL) defines the validity period of a token. While Vault eventually purges expired tokens from its backend, the primary purpose of TTL is access control duration, not storage optimization.
    • B. A shorter TTL limits the duration for which a token is valid. This minimizes the 'window of opportunity' for an unauthorized user or attacker to utilize the token if it is compromised, which is a core security best practice.
    • C. TTL determines how long a token remains valid, but it does not restrict the capabilities of the token. A valid token can still generate dynamic secrets if its associated policies allow it.
    • D. Encryption in transit is a separate security layer handled by TLS/HTTPS. TTL only governs the expiration of the token itself and does not impact data encryption methods.

    Domain 4: Vault leases

    Subdomain 4.3: Describe how to revoke leases

    15.Under which circumstance would an operator need to use the -force flag when revoking a Vault lease (e.g., vault lease revoke -force -prefix aws/)?

    1. A.When the lease has already expired and needs to be purged from the audit logs.
    2. B.When Vault cannot reach the target system to revoke the credential, and the lease needs to be removed from Vault's tracking.
    3. C.When the lease is associated with a static secret rather than a dynamic secret.
    4. D.When the operator only has 'read' permissions on the sys/leases endpoint.
    Show answer & explanation

    Correct answer: BWhen Vault cannot reach the target system to revoke the credential, and the lease needs to be removed from Vault's tracking.

    • A. Incorrect. The -force flag is not used to purge expired leases from audit logs. Vault handles expired leases through its internal lease management system automatically, and audit logs are append-only records of actions, not something managed via lease revocation.
    • B. Correct. The -force flag is used when Vault encounters errors while trying to contact the target backend (e.g., AWS, a database) to revoke a credential. It allows Vault to remove the lease from its internal data store and stop retry attempts, even if it cannot confirm the secret was successfully revoked on the remote system.
    • C. Incorrect. Static secrets typically do not utilize leases in the same way dynamic secrets do. The -force flag is specifically designed to handle failures in the dynamic revocation flow, not to distinguish between secret types.
    • D. Incorrect. The -force flag is a functional parameter for the revocation command and does not bypass Vault's Access Control Lists (ACLs). An operator requires specific 'update' or 'sudo' permissions on the sys/leases paths to perform revocation regardless of the flags used.

    Subdomain 4.1: Explain the purpose of a lease ID

    16.An administrator needs to revoke all dynamic AWS credentials generated under a specific role because the role configuration was compromised. They do not have the individual lease IDs. How can they achieve this using the lease system?

    1. A.vault lease revoke -prefix aws/creds/my-role
    2. B.vault token revoke -mode=path aws/creds/my-role
    3. C.vault secrets disable aws
    4. D.vault lease delete aws/creds/my-role
    Show answer & explanation

    Correct answer: Avault lease revoke -prefix aws/creds/my-role

    • A. Correct. The 'vault lease revoke' command supports a '-prefix' flag. This allows an administrator to revoke all leases matching a specific path prefix (e.g., 'aws/creds/my-role') in a single operation, which is the standard procedure when individual lease IDs are unknown or too numerous to handle individually.
    • B. Incorrect. The 'vault token revoke -mode=path' command is specifically used for revoking authentication tokens associated with a certain path. It does not target dynamic secret leases managed by secrets engines like AWS.
    • C. Incorrect. While disabling a secrets engine will revoke all associated leases, it is an extreme measure. It deletes the entire engine configuration and all roles defined within it, making it inappropriate for revoking credentials from a single compromised role.
    • D. Incorrect. 'vault lease delete' is not a valid Vault command. To invalidate a lease and its associated credentials before they naturally expire, you must use the 'revoke' subcommand.

    Subdomain 4.2: Describe how to renew leases

    17.While dynamic secrets use `vault lease renew`, which command is specifically used to renew the currently authenticated Vault token?

    1. A.vault token renew
    2. B.vault auth renew
    3. C.vault lease renew self
    4. D.vault login -renew
    Show answer & explanation

    Correct answer: Avault token renew

    • A. Correct. The `vault token renew` command is the standard CLI command for renewing tokens. When executed without a specific token ID provided as an argument, it automatically attempts to renew the token currently stored in the local environment or token helper (~/.vault-token).
    • B. Incorrect. The `vault auth` subcommand is used for managing authentication methods (such as enabling, disabling, or tuning auth backends like GitHub or AppRole). It does not contain a `renew` command for token maintenance.
    • C. Incorrect. While tokens are technically a form of lease in Vault's architecture, the CLI maintains a distinction between the two. `vault lease renew` is strictly used for leases generated by secret engines (dynamic secrets), whereas tokens must be renewed via the `token` subcommand.
    • D. Incorrect. The `vault login` command is used to perform the initial authentication against a specific method to obtain a token. It does not have a `-renew` flag; existing tokens are renewed via `vault token renew`.

    Domain 5: Secrets engines

    Subdomain 5.1: Choose a secrets engine based on use case

    18.When using a dynamic secrets engine (such as the Database secrets engine), Vault stores the generated credentials internally so they can be retrieved again by other users who request the same role.

    1. A.True
    2. B.False
    Show answer & explanation

    Correct answer: BFalse

    • A. The statement is false because dynamic secrets are designed to be ephemeral and unique to every request. While Vault stores metadata about the lease (such as the creation time and TTL) to manage revocation, it does not cache or store the actual credentials for the purpose of sharing them with other users or subsequent requests.
    • B. The statement is false because the primary function of a dynamic secrets engine is to generate fresh, on-demand credentials for each requester. Vault acts as a broker rather than a persistent storage for these secrets; once a request is made, a new set of credentials is created specifically for that lease and is not reused for other requests even if they target the same role.

    Subdomain 5.5: Describe the use of response wrapping

    19.Which Vault secrets engine is utilized under the hood to facilitate the storage of wrapped responses?

    1. A.Transit
    2. B.KV Version 2
    3. C.Cubbyhole
    4. D.Identity
    Show answer & explanation

    Correct answer: CCubbyhole

    • A. The Transit secrets engine is used for cryptographic operations like encryption, decryption, and signing (encryption-as-a-service). It does not provide the storage mechanism for wrapped responses.
    • B. KV Version 2 is a persistent key-value store with versioning capabilities. While it stores secrets, it is not the specialized ephemeral storage mechanism Vault uses to hold wrapped response tokens and their contents.
    • C. The Cubbyhole secrets engine provides a private, per-token storage space. Under the hood, Vault utilizes Cubbyhole for response wrapping because it offers ephemeral storage tied specifically to the lifetime of the wrapping token, ensuring the data is only accessible to the token holder.
    • D. The Identity secrets engine manages entities, aliases, and group membership for identity-based access control. It does not handle the temporary storage requirements of the response wrapping workflow.

    Subdomain 5.6: Explain the value of short-lived, dynamic secrets

    20.While Key/Value (KV) secrets engines store data exactly as provided, dynamic secrets engines (like the Database or AWS engines) differ because they:

    1. A.Store secrets in plaintext to improve retrieval performance
    2. B.Require the user to manually delete the secret from the target system when finished
    3. C.Create credentials on the target system dynamically upon request
    4. D.Only support human users and cannot be used by machine identities
    Show answer & explanation

    Correct answer: CCreate credentials on the target system dynamically upon request

    • A. Incorrect. Dynamic secrets engines are not characterized by plaintext storage or retrieval performance optimization. Instead, they focus on the on-demand generation of unique credentials that do not exist until requested.
    • B. Incorrect. A key feature of dynamic secrets is that HashiCorp Vault manages their lifecycle. Vault automatically revokes these credentials when their lease expires, eliminating the need for manual cleanup on the target system.
    • C. Correct. Unlike the KV engine which stores static data, dynamic secrets engines generate credentials on-the-fly on the target system (such as a database or cloud provider) when a client requests them. These credentials have an associated TTL and are unique to the requester.
    • D. Incorrect. Dynamic secrets engines are designed for both human users and machine identities. In fact, they are highly beneficial for programmatic access (applications, CI/CD pipelines) to ensure temporary, limited-scope access with a clear audit trail.

    Subdomain 5.4: Describe the purpose of secrets engines

    21.An application requires an API key to access a third-party SaaS provider. The SaaS provider does not support dynamic credential generation via API. What is the most appropriate way to use Vault's secrets engines for this requirement?

    1. A.Use the AppRole auth method to generate the API key.
    2. B.Store the static API key in the Key/Value (KV) secrets engine.
    3. C.Build a custom dynamic secrets engine for the SaaS provider.
    4. D.Use the Transit secrets engine to generate a new API key.
    Show answer & explanation

    Correct answer: BStore the static API key in the Key/Value (KV) secrets engine.

    • A. AppRole is an authentication method used by machines and applications to authenticate to Vault and obtain a token. It is not used for managing or generating third-party credentials like SaaS API keys.
    • B. When a provider does not support dynamic credential generation via an API, Vault's Key/Value (KV) secrets engine is the standard tool for securely storing and managing access to static secrets. This allows the application to retrieve the static key while Vault controls access via policies.
    • C. Building a custom dynamic secrets engine requires the target SaaS provider to have an API that supports programmatic creation and revocation of credentials. Since the provider in this scenario does not support this, a dynamic engine cannot be implemented.
    • D. The Transit secrets engine provides 'Encryption as a Service' (performing cryptographic operations like encryption, decryption, and signing). It does not store static secrets or generate credentials for third-party providers.

    Subdomain 5.2: Compare and contrast dynamic secrets vs. static secrets, know their use cases

    22.What is the primary characteristic that distinguishes a dynamic secret from a static secret in HashiCorp Vault?

    1. A.Dynamic secrets are encrypted in transit, while static secrets are only encrypted at rest.
    2. B.Dynamic secrets are generated on-demand and unique to the client, whereas static secrets are pre-created and shared.
    3. C.Dynamic secrets can only be accessed via the API, while static secrets are accessed via the UI.
    4. D.Dynamic secrets do not have a Time-To-Live (TTL), whereas static secrets expire automatically.
    Show answer & explanation

    Correct answer: BDynamic secrets are generated on-demand and unique to the client, whereas static secrets are pre-created and shared.

    • A. Incorrect. Both dynamic and static secrets are protected by Vault using encryption at rest and encryption in transit (via TLS). Encryption is a core property of Vault and not the distinguishing factor between secret types.
    • B. Correct. Dynamic secrets are generated only when requested (on-demand) and are typically unique to the specific client or lease. Static secrets (such as those in the KV engine) are pre-created, persistent, and are often shared across multiple users or applications until they are manually updated.
    • C. Incorrect. All secrets in Vault, whether dynamic or static, can be accessed through the API, CLI, and the UI. The interface used to retrieve the secret does not define its classification.
    • D. Incorrect. This statement is the opposite of how Vault works. Dynamic secrets rely on a lease system with a Time-To-Live (TTL) and are automatically revoked by Vault when the lease expires. Static secrets generally do not have a TTL and remain valid until manually changed or deleted.

    Subdomain 5.8: Access Vault secrets using the CLI, API, and UI

    23.Which CLI flag is used with the `vault kv get` command to return only the raw value of a specific key, omitting all other metadata and table formatting?

    1. A.-format=json
    2. B.-field=<key>
    3. C.-extract=<key>
    4. D.-value-only
    Show answer & explanation

    Correct answer: B-field=<key>

    • A. The `-format=json` flag changes the output format to structured JSON, but it still returns the full response including metadata. It does not isolate and return only a single raw value.
    • B. The `-field=<key>` flag is the correct Vault CLI option to extract only the value of a specific field. It strips away all table formatting, headers, and metadata, making it ideal for scripting or piping into environment variables.
    • C. There is no `-extract` flag for the `vault kv get` command. Vault uses the `-field` flag for this functionality.
    • D. `-value-only` is not a valid flag in the Vault CLI. The intended functionality is provided by the `-field` flag.

    Subdomain 5.7: Enable secrets engines using the API*, CLI, and UI

    24.Which of the following CLI commands correctly enables the AWS secrets engine at the default path?

    1. A.vault enable aws
    2. B.vault secrets enable aws
    3. C.vault mount aws
    4. D.vault engine enable aws
    Show answer & explanation

    Correct answer: Bvault secrets enable aws

    • A. Incorrect. The command 'vault enable aws' is missing the 'secrets' subcommand. Vault requires the 'vault secrets' command group to manage secrets engines.
    • B. Correct. 'vault secrets enable aws' is the standard CLI command to enable the AWS secrets engine at its default path, which is 'aws/'. This follows the standard 'vault secrets enable <path>' syntax.
    • C. Incorrect. 'vault mount' was used in legacy versions of Vault (pre-0.10.0). While it may exist as a legacy alias in some contexts, the current and official CLI syntax for the Vault Associate exam is 'vault secrets enable'.
    • D. Incorrect. 'vault engine enable aws' is not a valid command. Vault does not use 'engine' as a top-level CLI subcommand for enabling secrets engines; it uses 'secrets'.

    Subdomain 5.3: Describe the uses of transit secrets engine

    25.Which Transit secrets engine features or patterns should the application use to solve this problem?(Select 2)

    1. A.Use the /transit/encrypt endpoint with the large_file=true parameter
    2. B.Generate a Data Encryption Key (DEK) using the /transit/datakey endpoint
    3. C.Encrypt the large file locally within the application using the generated plaintext DEK
    4. D.Store the plaintext DEK alongside the encrypted file in the S3 bucket
    5. E.Use the /transit/hash endpoint to compress the file before sending it to Vault
    Show answer & explanation

    Correct answers: B, CGenerate a Data Encryption Key (DEK) using the /transit/datakey endpoint; Encrypt the large file locally within the application using the generated plaintext DEK

    • A. The Transit secrets engine's /encrypt endpoint is not designed for very large files as it requires sending the entire payload to Vault. Furthermore, there is no large_file=true parameter available in the Transit API.
    • B. Correct. The Transit /datakey endpoint is specifically designed for envelope encryption. It generates a high-entropy data encryption key (DEK) and returns both a plaintext version for immediate use and a ciphertext version (wrapped by Vault) for safe storage.
    • C. Correct. In the envelope encryption pattern, the application uses the plaintext DEK to encrypt large files locally. This avoids the network overhead and memory constraints associated with sending large payloads to Vault, leveraging Vault strictly for key management.
    • D. Storing a plaintext DEK alongside encrypted data defeats the purpose of encryption. Only the encrypted (wrapped) version of the DEK should be stored; the plaintext key should be used in memory and then discarded.
    • E. The Transit /hash endpoint is used for generating cryptographic hashes (like SHA-256) to ensure data integrity, not for compressing files or reducing their size for encryption.

    Domain 6: Encryption as a Service

    Subdomain 6.1: Encrypt and decrypt secrets

    26.When convergent encryption is enabled on a Transit key, encrypting the same plaintext multiple times will result in the exact same ciphertext, provided the same context is used.

    1. A.True
    2. B.False
    Show answer & explanation

    Correct answer: ATrue

    • A. The statement is true because convergent encryption is a mode where the encryption process is deterministic based on the provided context. By deriving the nonce from the context and the plaintext, Vault ensures that identical inputs result in identical outputs, which is particularly useful for tasks like data deduplication or searching encrypted records.
    • B. The statement is false because while standard Transit encryption is non-deterministic (producing different ciphertexts for the same input to prevent frequency analysis), enabling convergent encryption specifically changes this behavior to produce deterministic results when the same context is applied.

    Subdomain 6.2: Rotate the encryption key

    27.Your organization has a strict compliance requirement that all encryption keys used for customer data must be rotated automatically every 90 days. You are configuring a new key in the Transit secrets engine. Which of the following are required to fulfill this requirement?(Select 2)

    1. A.Configure the key with the `auto_rotate_period` parameter set to a valid duration (e.g., 90d).
    2. B.Ensure the Vault cluster remains unsealed, as auto-rotation relies on Vault's internal periodic tasks.
    3. C.Create a cron job on the Vault server operating system to call the rotation API.
    4. D.Set the `min_encryption_version` parameter to automatically increment every 90 days.
    5. E.Enable the `auto_rotate` flag in the main Vault configuration file (vault.hcl).
    Show answer & explanation

    Correct answers: A, BConfigure the key with the `auto_rotate_period` parameter set to a valid duration (e.g., 90d).; Ensure the Vault cluster remains unsealed, as auto-rotation relies on Vault's internal periodic tasks.

    • A. The `auto_rotate_period` parameter is the native Transit secrets engine setting used to define the frequency of key rotation. Setting this to 90 days (e.g., '90d') allows Vault to manage the rotation schedule internally without external triggers.
    • B. Vault's automatic key rotation is handled by internal background periodic tasks. These tasks only execute when the Vault cluster is unsealed and there is an active node available to process the schedule.
    • C. Creating an external cron job is an unnecessary manual workaround. Vault's Transit secrets engine has built-in support for scheduled rotation via the `auto_rotate_period` parameter.
    • D. The `min_encryption_version` parameter is used to phase out older key versions by enforcing that only newer versions are used for encryption; however, it does not trigger the creation of new key versions.
    • E. Key rotation settings are managed per-key within the Transit secrets engine. There is no global `auto_rotate` flag in the `vault.hcl` server configuration file for this purpose.

    Domain 7: Vault architecture fundamentals

    Subdomain 7.1: Describe how Vault encrypts data

    28.A security audit requires your organization to rotate the key used to encrypt data at rest within Vault. You execute the vault operator key-status command and then trigger a rotation. What happens to the existing data in the storage backend immediately after the encryption key is rotated?

    1. A.All existing data is immediately re-encrypted with the new key.
    2. B.Existing data remains encrypted with the old key, and only new or updated data uses the new key.
    3. C.Vault becomes sealed until the old data is manually migrated to the new key.
    4. D.The storage backend is wiped and restored from a backup using the new key.
    Show answer & explanation

    Correct answer: BExisting data remains encrypted with the old key, and only new or updated data uses the new key.

    • A. Vault does not immediately re-encrypt all existing stored data when the encryption key is rotated. Bulk re-encryption would be resource-intensive and could lead to significant performance issues or downtime. Re-encryption typically happens lazily as data is accessed and rewritten.
    • B. Correct. When Vault's barrier encryption key is rotated, a new key is generated and added to the keyring. All subsequent write operations use the new key, but existing data remains encrypted with the older key versions. Vault maintains a keyring of older keys to ensure it can still decrypt existing data when it is read.
    • C. Rotating the encryption key is a standard administrative operation and does not cause Vault to enter a sealed state. Vault continues to function normally throughout the rotation process.
    • D. Key rotation is a non-destructive process. The storage backend is never wiped or restored from backup during a rotation; Vault simply updates the keys it uses to manage data at the barrier level.

    Subdomain 7.3: Configure environment variables

    29.Which of the following environment variables are used by the Vault CLI to configure TLS certificates and verification?(Select 2)

    1. A.VAULT_CACERT
    2. B.VAULT_SKIP_VERIFY
    3. C.VAULT_IGNORE_TLS
    4. D.VAULT_SSL_CERT
    5. E.VAULT_CERT_PATH
    Show answer & explanation

    Correct answers: A, BVAULT_CACERT; VAULT_SKIP_VERIFY

    • A. Correct. VAULT_CACERT specifies the path to a PEM-encoded CA certificate file that the Vault CLI uses to verify the Vault server's SSL certificate, ensuring a trusted connection.
    • B. Correct. VAULT_SKIP_VERIFY disables SSL certificate verification for the Vault CLI. While useful for troubleshooting or development environments with self-signed certificates, it is not recommended for production due to security risks.
    • C. Incorrect. VAULT_IGNORE_TLS is not a valid environment variable for the Vault CLI; the standard variable to bypass verification is VAULT_SKIP_VERIFY.
    • D. Incorrect. VAULT_SSL_CERT is not a documented Vault environment variable. To provide a client certificate for TLS authentication, VAULT_CLIENT_CERT is used instead.
    • E. Incorrect. VAULT_CERT_PATH is not used by Vault. To specify a directory of CA certificates rather than a single file, the Vault CLI utilizes the VAULT_CAPATH variable.

    Subdomain 7.2: Explain how to seal and unseal Vault

    30.Three different key holders are required to unseal a Vault server. Alice enters her unseal key first. Before Bob and Charlie enter their keys, the Vault server is restarted. Because the unseal process is stateful in memory, Alice's progress is lost and the unseal process must be ________.

    1. A.resumed using a recovery token
    2. B.restarted from the beginning
    3. C.completed by an administrator
    Show answer & explanation

    Correct answer: Brestarted from the beginning

    • A. Incorrect. Recovery tokens (or recovery keys in Auto-Unseal configurations) are used for specific recovery operations like generating a root token or authorizing certain system changes. They cannot be used to resume a partial unseal sequence that was interrupted by a server restart.
    • B. Correct. Vault's unseal process is stateful and the partial key shares are stored in the server's memory. If the Vault process is restarted, the volatile memory is cleared, causing the unseal progress to be lost. Therefore, the sequence must be started again from the beginning by all required key holders.
    • C. Incorrect. An administrator has no special bypass to complete the unseal process without satisfying the Shamir's Secret Sharing threshold. The cryptographic keys are required to decrypt the master key, and no administrative role can override this fundamental security mechanism.

    Domain 8: Vault deployment architecture

    Subdomain 8.4: Explain the uses of disaster recovery and performance replication

    31.You recently performed a Disaster Recovery failover, promoting your DR secondary to become the new primary cluster. The original primary cluster has now recovered and come back online. What must you do to integrate the original primary back into the replication topology?

    1. A.It will automatically detect the new primary and demote itself to a DR secondary.
    2. B.You must manually demote the original primary and configure it as a secondary to the new primary.
    3. C.You must restart the Vault service on the original primary, and it will resume its primary role, demoting the other cluster.
    4. D.You must enable bidirectional replication on both clusters to merge the split-brain state.
    Show answer & explanation

    Correct answer: BYou must manually demote the original primary and configure it as a secondary to the new primary.

    • A. Vault Disaster Recovery (DR) does not automatically detect a change in topology or self-demote. Re-establishing the replication relationship after a failover requires explicit administrative intervention.
    • B. This is the correct standard operating procedure. After a failover, the old primary remains in a 'primary' state but is orphaned from the new topology. To reintegrate it, you must demote it to a secondary and then point it to the current primary to resume replication and avoid a split-brain scenario.
    • C. Restarting the Vault service does not change its replication role. If the original primary is restarted without being demoted, it will still attempt to act as a primary, which conflicts with the current promoted primary.
    • D. Vault DR replication is strictly unidirectional (from primary to secondary). Bidirectional replication is not a supported feature, and merging split-brain states is managed by re-syncing the secondary from the authoritative primary.

    Subdomain 8.1: Explain cluster strategy for self-managed and HashiCorp-managed clusters

    32.A financial company is experiencing high read-heavy traffic on their self-managed Vault cluster, causing performance bottlenecks on the active node. They decide to upgrade to Vault Enterprise. Which cluster strategy feature should they implement to allow standby nodes to handle read-only requests?

    1. A.Disaster Recovery Replication
    2. B.Performance Standby Nodes
    3. C.Integrated Storage Auto-Scaling
    4. D.Vault Agent Caching
    Show answer & explanation

    Correct answer: BPerformance Standby Nodes

    • A. Disaster Recovery (DR) Replication is used to create a secondary 'warm' cluster for failover purposes. DR secondaries do not serve any client traffic, making this feature unsuitable for scaling read throughput in an active cluster.
    • B. Performance Standby Nodes are a Vault Enterprise feature that allows standby nodes to serve read-only requests. This offloads significant traffic from the active node, which is primarily responsible for write operations, thereby improving performance for read-heavy workloads.
    • C. Integrated Storage Auto-Scaling is not a Vault cluster strategy feature designed for routing read-only requests. While storage capacity and Raft consensus are critical, they do not provide the mechanism to enable standby nodes to process client read requests.
    • D. Vault Agent Caching is a client-side optimization that caches secrets and tokens to reduce the frequency of requests to the Vault server. While it reduces overall load, it is not a cluster-level feature that enables standby nodes to handle requests.

    Subdomain 8.5: Differentiate between self-managed and HashiCorp-managed Vault clusters

    33.In a HashiCorp-managed Vault deployment, the Vault cluster is deployed into an isolated cloud network managed by HashiCorp known as the ________.

    1. A.HashiCorp Virtual Network (HVN)
    2. B.HashiCorp Transit Gateway (HTG)
    3. C.HashiCorp Private Link (HPL)
    Show answer & explanation

    Correct answer: AHashiCorp Virtual Network (HVN)

    • A. The HashiCorp Virtual Network (HVN) is the dedicated, isolated cloud network managed by HashiCorp within the HashiCorp Cloud Platform (HCP). It provides a secure environment for deploying services like Vault and Consul, allowing for peering with the customer's own cloud infrastructure (VPC/VNet).
    • B. A Transit Gateway is a cloud networking hub used to interconnect VPCs and on-premises networks. While HCP can integrate with AWS Transit Gateway for connectivity, the actual isolated network where the Vault cluster resides is specifically called the HVN.
    • C. Private Link is a connectivity service (such as AWS PrivateLink or Azure Private Link) that allows users to access HCP services privately. It is a method of communication rather than the name of the isolated network environment hosting the Vault cluster.

    Domain 9: Access management architecture

    Subdomain 9.1: Describe the Vault Agent

    34.You are deploying a short-lived batch processing job. You want Vault Agent to authenticate, write the token to a sink, and then immediately terminate so the batch job can proceed without a lingering background process. Which Vault Agent configuration parameter should you use?

    1. A.`terminate_on_success = true`
    2. B.`exit_after_auth = true`
    3. C.`run_once = true`
    4. D.`daemon = false`
    Show answer & explanation

    Correct answer: B`exit_after_auth = true`

    • A. This parameter does not exist in the Vault Agent configuration schema. It is a common misconception, but the correct syntax is specific to the authentication lifecycle.
    • B. Correct. The `exit_after_auth` parameter (defaulting to false) is used within the Vault Agent's `auto_auth` configuration block. When set to true, the Agent will perform authentication, write the acquired token to any configured sinks, and then terminate immediately. This is the recommended approach for short-lived batch jobs or CI/CD pipelines where a persistent background daemon is unnecessary.
    • C. While 'run once' is a common concept in container orchestration (like Kubernetes Jobs), it is not a valid configuration parameter for the Vault Agent.
    • D. Vault Agent does not use a `daemon` configuration parameter to control exiting after authentication. Its lifecycle behavior for ephemeral tasks is managed specifically through the `exit_after_auth` setting.

    Subdomain 9.2: Vault Secrets Operator

    35.Which Vault Secrets Operator Custom Resource is specifically used to synchronize a KV-V2 secret from Vault into a Kubernetes Secret?

    1. A.VaultDynamicSecret
    2. B.VaultStaticSecret
    3. C.VaultPKISecret
    4. D.VaultTransitSecret
    Show answer & explanation

    Correct answer: BVaultStaticSecret

    • A. VaultDynamicSecret is used for dynamic secrets that are generated on-demand by Vault (e.g., database credentials or cloud IAM keys) and have a limited lifespan. It is not the resource used for synchronizing existing static KV secrets.
    • B. VaultStaticSecret is the custom resource specifically designed to synchronize static secrets, such as those stored in the KV-V1 or KV-V2 secrets engines, from Vault into a native Kubernetes Secret. This allows Kubernetes applications to consume the secrets as environment variables or files.
    • C. VaultPKISecret is used for managing PKI (Public Key Infrastructure) data, such as certificates and private keys. It is not intended for general KV secret synchronization.
    • D. VaultTransitSecret is associated with the Transit secrets engine, which handles encryption, decryption, and cryptographic operations. It does not synchronize KV-V2 secret data into Kubernetes Secrets.

    Want the full experience?

    These are just samples. Practice the full HashiCorp Vault Associate question bank in quiz mode — free, no signup, with domain practice and exam simulation.