Courseiva

CCNA Vault Agent Configuration Questions

21 questions · Vault Agent Configuration · All types, answers revealed

1
MCQmedium

A DevOps engineer is using Vault Agent templates to render a database password from a KV v2 secrets engine. The secret is stored at secret/data/db with a key named password. The engineer wants to ensure the rendered file contains only the password value and no extra whitespace or newlines. Which template function should be used to trim whitespace from the secret value?

A.regexReplaceAll
B.base64Decode
C.toUpper
D.trim
AnswerD

The trim function removes leading and trailing whitespace from a string. Applying it to the secret value ensures the rendered file contains only the password characters, with no stray spaces or newlines. This is the correct choice when the goal is to strip whitespace from the beginning and end of the value while preserving the core content.

Why this answer

Vault Agent templates support the trim function to remove leading and trailing whitespace from a string. Applying it to the retrieved secret value ensures the output file contains only the password. Other functions like toUpper, base64Decode, and regexReplaceAll serve different purposes and do not provide the straightforward whitespace removal needed here.

Exam trap

The trap here is reaching for a more complex function like regexReplaceAll when a simple trim already does the job.

2
MCQhard

A Vault Agent is configured with auto_auth using the AWS auth method and a cache block with use_auto_auth_token = true. A client application connects to the agent's listener and sends a request to read a secret at secret/data/app. The agent's cached token lacks permission for that path, but the client also provides its own Vault token in the X-Vault-Token header. How does the agent handle the request?

A.The agent attempts to renew the auto-auth token and retries the request, ignoring the client token until the auto-auth token gains access.
B.The agent forwards the request to Vault using the client-provided token, because the client token takes precedence when present.
C.The agent rejects the request with a 403 error because the auto-auth token is not authorized for the path.
D.The agent ignores the client token and uses the auto-auth token, causing Vault to return a permission denied error.
AnswerB

When use_auto_auth_token is true, the agent uses its auto-auth token only if the incoming request does not already carry a token. If the client supplies an X-Vault-Token header, the agent proxies the request with that token instead. This allows clients to use their own credentials for paths the auto-auth token cannot access, while still benefiting from the agent's caching and connection management.

Why this answer

With use_auto_auth_token enabled, the agent uses its auto-auth token only when the client request lacks a token. If the client includes an X-Vault-Token header, the agent forwards that token to Vault. The agent does not evaluate permissions itself; Vault enforces policies.

This design lets clients use their own tokens for specific paths while still leveraging the agent's caching and proxying.

Exam trap

The trap here is assuming the agent always enforces its own token, when in fact a client-supplied token takes precedence.

3
MCQhard

Your security team requires that Vault Agent use a specific namespace in Vault Enterprise for all auto-auth and secret retrieval operations. The agent is configured with AppRole auto-auth. Which configuration parameter must you set to ensure the agent operates within the required namespace?

A.namespace in the cache block
B.namespace in the vault block
C.namespace in the template block
D.namespace in the auto_auth block
AnswerB

The top-level vault block includes a namespace parameter that sets the Vault Enterprise namespace for all agent operations. Setting it there ensures that auto-auth, templating, and caching all use the specified namespace consistently, which is required for proper isolation and access control.

Why this answer

In Vault Enterprise, the agent's namespace is configured in the top-level vault block. This setting applies to all agent operations, including auto-auth, templating, and caching. Setting it there ensures the agent interacts with the correct namespace, which is essential for multi-tenant environments and proper access control.

Exam trap

The trap here is assuming that namespace can be set per-block, when in fact it is a global setting in the vault stanza that applies to the entire agent.

4
MCQeasy

What is the benefit of using a Vault Agent sink?

A.It persists the token to disk for other processes.
B.It automates the Vault server backup.
C.It encrypts the vault server traffic.
D.It compresses the template output.
AnswerA

A sink writes the auto-auth token to a file or Unix socket, letting other processes on the host reuse it without re-authenticating. This satisfies the scenario's requirement by persisting the token to disk for other processes.

Why this answer

A Vault Agent sink is a configuration block that writes the agent's auto-auth token (and optionally wrapped data) to a file on disk so that other local processes — not just the agent's own templates — can consume it. This is the documented purpose of the 'sink' stanza in the agent config, which supports file sinks with configurable mode, owner, and group. It decouples token acquisition from token consumption for legacy or non-Vault-aware applications.

Exam trap

Vault Enterprise often tests the distinction between sinks (persist the token for other processes) and templates (render secrets into config files), so candidates who conflate the two pick a template-related answer.

How to eliminate wrong answers

Option B is wrong because Vault Agent does not perform server backups; backup of the storage backend (Integrated Storage snapshots, Consul snapshots, etc.) is a separate operational task using 'vault operator raft snapshot' or the storage backend's own tooling. Option C is wrong because Vault Agent does not terminate or encrypt server traffic — TLS between agent and server is configured via the 'vault { tls_* }' stanza, not via sinks. Option D is wrong because sinks do not compress template output; template rendering is handled by the 'template' stanza, and compression is not a sink feature.

5
MCQeasy

Which signal is commonly used with 'change_mode = signal' in Vault Agent templates to reload a service without stopping it?

A.SIGKILL
B.SIGINT
C.SIGHUP
D.SIGTERM
AnswerC

SIGHUP causes the target process to reload its configuration without terminating, letting the service pick up regenerated template files while remaining running. Other signals such as SIGTERM or SIGINT stop the process, defeating the goal of reloading without downtime.

Why this answer

SIGHUP (Signal Hang Up) is the conventional Unix signal used to tell a long-running daemon to reload its configuration files without terminating the process. In Vault Agent templates, setting change_mode = signal with signal = "SIGHUP" causes the agent to send SIGHUP to the configured process whenever the rendered template changes, prompting the service to re-read its config in place. This preserves the running process, its PID, and any in-memory state while picking up new secrets or certificates.

Exam trap

The trap here is conflating 'reload without stopping' with generic process-control signals — candidates often pick SIGTERM or SIGINT because they associate them with 'restarting' a service, missing that only SIGHUP is the conventional reload signal.

How to eliminate wrong answers

Option A is wrong because SIGKILL cannot be caught or handled by a process — it terminates the process immediately with no chance to reload configuration, defeating the purpose of a non-disruptive reload. Option B is wrong because SIGINT is the interactive interrupt signal (Ctrl+C) intended to stop a process, not reload it. Option D is wrong because SIGTERM requests graceful termination of the process, which stops the service rather than reloading it in place.

6
Multi-Selecthard

Which TWO of the following are valid parameters for configuring the 'sink' in Vault Agent?

Select 2 answers
A.type
B.ttl
C.config
D.auth_method
E.mode
AnswersA, C

The `type` parameter selects the sink destination, such as `file` or `syslog`, and is mandatory when declaring a sink block. It satisfies the stem's requirement for a valid sink parameter, since Vault Agent cannot route audit entries without knowing which sink implementation to instantiate.

Why this answer

In Vault Agent's sink stanza, the two valid configuration parameters are 'type' (option A) and 'config' (option C). The 'type' parameter specifies the sink backend, such as 'file' for writing tokens to disk, and is required to determine how the sink behaves. The 'config' parameter supplies a map of backend-specific settings (for example, the file path and permissions when type is 'file'), so it is the mechanism for passing sink-specific options.

Options B ('ttl'), D ('auth_method'), and E ('mode') are not sink parameters: 'ttl' and 'auth_method' belong to the auto-auth or token configuration, and 'mode' is a file-permission setting that would be nested inside the sink's config block rather than a top-level sink parameter.

Exam trap

The trap is mixing up parameters from different Vault Agent stanzas — candidates often pick 'auth_method' or 'ttl' because they appear elsewhere in the agent config, but sinks only accept 'type' and 'config'.

7
MCQeasy

Where does the Vault Agent store the token it retrieves via auto-auth by default if a sink is not defined?

A./tmp/vault.token
B./var/run/vault/token
C.Environment variable VAULT_TOKEN
D.In-memory
AnswerD

Without a sink, the token exists only in the agent's memory.

Why this answer

When no sink is configured, Vault Agent auto-auth keeps the acquired token in memory only. The token is not written to disk or exported to an environment variable by default; it is held by the agent process and used for cache requests or template rendering. Persisting it requires explicitly defining a sink.

Exam trap

The trap is assuming the agent must persist the token somewhere by default, leading candidates to pick a file path or environment variable when the default is actually in-memory only.

How to eliminate wrong answers

Option A is wrong because /tmp/vault.token is not a default path — it would only exist if a file sink were configured with that path. Option B is wrong because /var/run/vault/token is not a default; it is a common convention for a file sink but must be explicitly set. Option C is wrong because the agent does not export VAULT_TOKEN to the environment by default; that would require a sink or manual export.

8
MCQmedium

You are configuring a Vault Agent to use the AppRole auth method. The agent must retrieve a secret from a KV v2 secrets engine and render it into a configuration file. The secret path is 'secret/data/myapp/config'. Which template function should you use to access the secret's data?

A.{{ with secret "secret/myapp/config" }}{{ .Data.config }}{{ end }}
B.{{ with secret "secret/data/myapp/config" }}{{ .Data.data.config }}{{ end }}
C.{{ with secret "secret/data/myapp/config" }}{{ .Data.config }}{{ end }}
D.{{ with secret "secret/myapp/config" }}{{ .Data.data.config }}{{ end }}
AnswerB

For KV v2, secrets are nested under 'data.data'. The 'secret' function retrieves the secret, and the correct path includes '/data/' to access the KV v2 API. The template accesses .Data.data.config to get the value. This is the correct syntax for KV v2 secrets.

Why this answer

KV v2 secrets require the path to include '/data/' and the secret data is nested under .Data.data. The template function 'secret' is used with the full path, and the value is accessed via .Data.data.<key>. This ensures correct retrieval and rendering.

Exam trap

The trap here is mixing KV v1 and v2 path structures and data nesting, which often leads to missing secrets.

9
MCQmedium

You want the Vault Agent to run as a sidecar. Which configuration block allows you to specify the listener address for the Vault Agent's internal API?

A.tcp_listener
B.listener
C.server
D.api_listener
AnswerB

The listener stanza defines the address and port where Vault Agent exposes its internal API, such as a Unix socket or loopback TCP endpoint. Without it, the agent cannot serve cached tokens or secrets to the sidecar's co-located application, satisfying the requirement to specify that listener address.

Why this answer

The Vault Agent configuration uses a top-level 'listener' block (not 'tcp_listener' or 'api_listener') to define the address and port where the Agent's internal API/cache proxy listens. This stanza accepts 'type = "tcp"' along with 'address' and optional 'tls_disable' settings. It is the same stanza name used in the Vault server config, which is why candidates sometimes confuse the two.

Exam trap

The trap here is confusing the Agent's own listener stanza with the upstream 'vault'/'server' block — candidates often pick 'server' thinking it configures the Agent's API, when it actually points the Agent at the real Vault cluster.

How to eliminate wrong answers

Option A is wrong because 'tcp_listener' is not a valid Vault Agent configuration block — the type 'tcp' is specified inside the 'listener' block, not as the block name. Option C is wrong because 'server' is a top-level Vault Agent block that points the Agent at the upstream Vault server (address, CA cert, etc.), not the Agent's own listener. Option D is wrong because 'api_listener' does not exist in Vault Agent configuration; the internal API is exposed through the standard 'listener' stanza.

10
MCQmedium

Which configuration parameter in the Vault Agent 'cache' block allows you to disable caching for specific requests?

A.ignore_requests
B.exclude_paths
C.disable_cache
D.There is no per-request bypass in the configuration.
AnswerD

Vault Agent's cache block exposes no per-request bypass setting; caching applies uniformly to proxied requests. Any listener or cache stanza configuration cannot selectively disable caching for individual requests, so this option correctly identifies that no such parameter exists.

Why this answer

The Vault Agent cache block does not expose a configuration parameter to bypass caching for specific requests. Caching behavior is controlled globally (for example, via the cache listener and persist settings), and there is no per-request or per-path bypass option in the agent configuration. Therefore the correct answer is that no such parameter exists.

Exam trap

The trap is that candidates assume a granular bypass option must exist and pick a plausible-sounding parameter name, when the exam is testing knowledge that the cache block has no per-request exclusion setting.

How to eliminate wrong answers

Option A is wrong because 'ignore_requests' is not a valid Vault Agent cache parameter. Option B is wrong because 'exclude_paths' is not a cache-block option — path filtering exists in replication contexts, not agent caching. Option C is wrong because 'disable_cache' is not a recognized parameter for selectively disabling caching of specific requests.

11
Multi-Selectmedium

You are configuring Vault Agent auto-auth with the AWS auth method. The agent must authenticate using an IAM role attached to an EC2 instance. Which two parameters are required in the auto_auth block's method configuration to enable this? (Choose two.)

Select 2 answers
A.type = "aws"
B.secret_key = "secret"
C.region = "us-east-1"
D.access_key = "AKIA..."
E.role = "my-role"
AnswersA, E

The `type` parameter specifies the auth method to use. Setting it to `aws` tells the agent to use the AWS auth method, which is necessary for authenticating with an IAM role attached to an EC2 instance. Without this, the agent would not know which auth method to invoke.

Why this answer

To configure AWS auto-auth using an IAM role, the agent needs to know the auth method type and the Vault role to authenticate against. The `type` and `role` parameters are required. Static credentials like access key and secret key are not used when relying on instance metadata, and the region is optional.

Exam trap

The trap here is assuming that static AWS credentials are always required, when in fact the AWS auth method can use instance metadata for IAM roles without them.

12
MCQmedium

You are configuring Vault Agent with a cache stanza to cache responses from a Vault Enterprise cluster. The cache is enabled, and you want to ensure that the agent can continue to serve cached secrets even if the Vault cluster becomes temporarily unavailable. Which cache parameter should you configure to control how long the agent will serve stale data?

A.lease_duration
B.persist
C.serve_stale
D.max_age
AnswerC

The serve_stale parameter in the cache stanza specifies whether the agent should serve stale cached data if the Vault cluster is unreachable. When set to true, the agent will continue to serve the last known cached response even after the secret's lease has expired, until connectivity is restored. This directly meets the requirement of maintaining availability during a Vault outage.

Why this answer

The serve_stale parameter in the cache stanza allows the agent to serve cached secrets even after their lease has expired if the Vault cluster cannot be reached. This is crucial for high availability during transient outages. Other parameters like persist affect cache durability across restarts, but not stale data serving. lease_duration and max_age are not cache configuration parameters.

Exam trap

The trap here is confusing persist with serve_stale; persist deals with cache survival across restarts, while serve_stale deals with serving expired data during a Vault outage.

13
MCQeasy

A platform engineer is configuring a Vault Agent on a database server. The agent must use the AppRole auth method and write the resulting token to a file so that a local backup script can read it. Which top-level configuration block should the engineer populate to define the AppRole role ID and secret ID?

A.cache
B.listener
C.auto_auth
D.template
AnswerC

The auto_auth block is the correct location for configuring the agent's authentication method. Within auto_auth, the engineer defines a method block with type "approle" and supplies role_id and secret_id parameters. This block also controls where the token is written via sink blocks. It is the only top-level block designed to perform authentication and token acquisition for the agent.

Why this answer

Agent authentication is configured in the auto_auth block, where the method type and its parameters are declared. For AppRole, role_id and secret_id belong inside the method block nested under auto_auth. The other blocks handle caching, listeners, and secret rendering, and none of them accept authentication credentials.

Without auto_auth, the agent has no token source.

Exam trap

The trap here is assuming that any block that mentions tokens or secrets can hold authentication credentials, when only auto_auth is designed for that purpose.

14
Multi-Selecteasy

Which TWO authentication methods are commonly configured in the 'auto_auth' block?

Select 2 answers
A.Userpass
B.AppRole
C.LDAP
D.Kubernetes
E.GitHub
AnswersB, D

AppRole suits `auto_auth` because it issues a SecretID and RoleID that a Vault Agent or proxy can present without human interaction, satisfying the stem's requirement for machine-driven, non-interactive authentication. Its role-based credential model lets workloads authenticate automatically at start-up, unlike user-centric methods requiring manual login.

Why this answer

In HashiCorp Vault's agent configuration, the auto_auth block is designed for machine-to-machine authentication, and AppRole (option B) is the canonical method because it issues a role_id and secret_id that a service can supply non-interactively to obtain a Vault token. Kubernetes (option D) is equally common in the auto_auth block because pods can authenticate using their service account JWT via the Kubernetes auth method, again without human interaction. Both AppRole and Kubernetes are explicitly documented as typical auto_auth methods for workloads and CI/CD pipelines.

By contrast, Userpass (A), LDAP (C), and GitHub (E) are human-oriented or interactive auth methods that require credentials such as a username/password or an OAuth flow, so they are not the standard choices configured inside auto_auth.

15
Multi-Selecthard

You are configuring Vault Agent auto-auth with the AppRole auth method on a set of servers. You need to ensure that the agent can authenticate securely using role_id and secret_id. Which two configuration parameters are required within the auto_auth method block for AppRole? (Choose two.)

Select 2 answers
A.namespace
B.wrap_ttl
C.mount_path
D.role_id
E.secret_id
AnswersD, E

role_id is a required parameter for the AppRole auth method in Vault Agent's auto_auth stanza. It identifies the role that the agent will use to authenticate. Without a role_id, the agent cannot specify which AppRole to use, and authentication will fail. It is typically provided as a string or via a file path using role_id_file_path.

Why this answer

For AppRole authentication in Vault Agent's auto_auth stanza, both role_id and secret_id are mandatory. They provide the necessary credentials to authenticate. Optional parameters like namespace and mount_path are only needed in specific configurations, such as when using a custom namespace or mount path. wrap_ttl is unrelated to the method block and is used for response wrapping in sinks.

Exam trap

The trap here is assuming that namespace or mount_path are always required for AppRole, when they are only needed in non-default configurations.

16
MCQhard

When using 'template_config' to set the 'static_secret_render_interval', what is the minimum value you can set?

A.1s
B.0s
C.5s
D.10s
AnswerC

The `static_secret_render_interval` parameter accepts a minimum of 5 seconds, matching the stem's constraint. Values below this floor are rejected by Vault's template configuration validation, so 5s is the lowest permitted setting for controlling how frequently static secrets are re-rendered to the destination file.

Why this answer

The 'static_secret_render_interval' in Vault Agent's 'template_config' controls how often static secrets are re-rendered, and the minimum allowed value is 5 seconds. Setting it lower than 5s is rejected by Vault Agent to prevent excessive API calls and resource churn.

Exam trap

The trap is assuming any positive integer is valid — candidates often pick 1s or 0s without knowing Vault enforces a 5-second floor on 'static_secret_render_interval'.

How to eliminate wrong answers

Option A is wrong because 1s is below the enforced minimum and will be rejected. Option B is wrong because 0s is not a valid interval — it would imply continuous rendering, which Vault Agent does not permit. Option D is wrong because 10s is a valid value but not the minimum; the question asks for the minimum, which is 5s.

17
Multi-Selecteasy

Which TWO of the following are valid sink types in Vault Agent?

Select 2 answers
A.vault
B.file
C.s3
D.stdout
E.memory
AnswersB, D

The file sink writes tokens and wrapped secrets to a file path on disk, making it one of Vault Agent's valid sink types alongside stdout. It satisfies the requirement by persisting credentials for consuming applications.

Why this answer

In Vault Agent's template stanza, a sink is the destination where the rendered secrets are written, and the two supported sink types are 'file' and 'stdout'. Option B (file) is correct because Vault Agent can write rendered templates to a file sink, configured with a path and optional permissions such as 'perms = "0644"'. Option D (stdout) is correct because Vault Agent supports a stdout sink that writes the rendered output to standard output, which is useful for piping secrets into processes or containers.

Option A (vault) is not a sink type; it is the source of secrets, not a destination for rendered templates. Option C (s3) is not a supported sink type in Vault Agent, as it does not natively write rendered templates to S3. Option E (memory) is also not a valid sink type, since Vault Agent does not expose an in-memory sink for rendered templates.

Exam trap

Vault Enterprise often tests the distinction between sink types and other Vault Agent components, such as auto-auth methods or caching backends, causing candidates to mistakenly select 'vault' or 's3' as sinks.

18
Multi-Selectmedium

Your team runs Vault Agent with auto_auth using the AWS auth method on EC2 instances. The agent's token is about to expire, and you must ensure the agent continues to serve requests without manual intervention. Which TWO behaviors does Vault Agent perform to maintain a valid token? (Choose two.)

Select 2 answers
A.The agent promotes the token to a periodic token by calling the auth method's tune endpoint with a period parameter.
B.The agent automatically renews the token using the renew-self endpoint before its TTL expires, as long as the token is renewable.
C.The agent writes the token to the sink and then requests a new wrapped secret_id from the orchestrator using the response-wrapping endpoint.
D.The agent disables token renewal and instead relies on the Vault server's default lease duration to expire and recreate the token automatically.
E.The agent re-authenticates with the AWS auth method to obtain a new token when the existing token is not renewable or renewal fails.
AnswersB, E

Vault Agent's auto_auth lifecycle includes a token renewal loop. When the token is renewable, the agent calls the renew-self endpoint before expiry to extend its lifetime. This keeps the agent authenticated without operator action and is the primary mechanism for long-running workloads such as EC2 instances that must serve secrets continuously.

Why this answer

Vault Agent maintains authentication by first attempting token renewal through the renew-self endpoint while the token remains renewable. If renewal is impossible because the token is non-renewable, has hit its max TTL, or errors, the agent re-executes the auto_auth method to obtain a fresh token. Together these behaviors keep long-running workloads authenticated without manual restarts.

Exam trap

The trap here is believing the agent can alter token periodicity or fetch wrapped secret_ids itself, when those are operator or orchestrator responsibilities.

19
MCQmedium

When using Vault Agent to authenticate with the AWS auth method, which parameter is required in the 'method' block to identify the IAM role?

A.identity
B.iam_role
C.aws_role
D.role
AnswerD

The AWS auth method's 'method' block requires 'role' to name the IAM role whose bound principal and policies Vault uses when authenticating. Without it, Vault cannot map the signed STS identity to a configured role, so login fails.

Why this answer

In Vault Agent's auto-auth configuration, the AWS auth method's 'method' block requires the 'role' parameter to specify which Vault role (bound to an IAM principal) the agent should authenticate as. The 'role' parameter maps to the Vault role name, not the IAM role name directly — the binding between IAM role and Vault role is configured server-side. This is consistent across all Vault auth methods, which use 'role' as the standard parameter name.

Exam trap

The trap is the plausible-sounding 'iam_role' or 'aws_role' — candidates assume the parameter name mirrors the AWS concept, but Vault standardizes on 'role' across all auth methods.

How to eliminate wrong answers

Option A is wrong because 'identity' is not a valid parameter in the AWS auth method's method block — it may be confused with identity tokens or entity aliases, but it does not identify the IAM role. Option B is wrong because 'iam_role' is not a recognized Vault Agent auto-auth parameter; while the AWS auth method does bind to IAM roles, the parameter name is not 'iam_role'. Option C is wrong because 'aws_role' is not a valid parameter — it sounds plausible but Vault uses the generic 'role' key across auth methods for consistency.

20
MCQeasy

Which component of the Vault Agent is responsible for managing the lifecycle of the vault token retrieved via auto-auth?

A.Sink
B.Template engine
C.Auto-auth
D.Cache
AnswerC

Auto-auth handles token login, renewal, and maintenance.

Why this answer

The auto-auth component of Vault Agent is responsible for authenticating to Vault and managing the lifecycle of the resulting token, including renewal and re-authentication when the token expires. It obtains the token via the configured auth method (e.g., AppRole, AWS, Kubernetes) and keeps it valid for other components like the template engine and cache.

Exam trap

The trap is confusing auto-auth with sinks or cache — candidates must remember that auto-auth owns the authentication and token renewal lifecycle, while sinks only persist the token and cache only stores it for reuse.

How to eliminate wrong answers

Option A is wrong because a sink is a destination for the token (e.g., a file) — it writes the token out but does not manage its lifecycle or renewal. Option B is wrong because the template engine consumes secrets and tokens to render files but does not authenticate or renew tokens. Option D is wrong because the cache stores tokens and leases for reuse by other processes but does not perform authentication or renewal itself.

21
Multi-Selectmedium

Which THREE actions can the 'change_mode' parameter trigger in the Vault Agent template block?

Select 3 answers
A.signal
B.restart
C.delete
D.noop
E.exec
AnswersA, B, D

Sends a signal to the process specified by the exec block's command, allowing graceful reload without terminating it. This satisfies the change_mode requirement for notifying a running application of updated secrets via a configurable signal.

Why this answer

In the Vault Agent template stanza, the change_mode parameter controls what happens when the rendered secret changes, and its valid values are signal, restart, and noop. Option A (signal) is correct because it sends the configured signal (default SIGHUP, or the value of signal) to the process specified by the exec block, allowing the application to reload its configuration without a full restart. Option B (restart) is correct because it instructs Vault Agent to stop and restart the child process defined in the exec block so it picks up the new secret.

Option D (noop) is correct because it tells Vault Agent to take no action on the process when the template output changes, leaving the application to detect the change itself. Option C (delete) is not a valid change_mode value; Vault Agent does not delete the process or file as a change action. Option E (exec) is also not a valid change_mode value; exec is a separate template stanza block that defines the command to run, not a change-triggered action.

Exam trap

The trap is confusing `change_mode` values with other Vault Agent features — candidates may assume `exec` or `delete` are valid change modes because Vault Agent supports exec blocks and file management, but the actual valid values are only `signal`, `restart`, and `noop`.

Ready to test yourself?

Try a timed practice session using only Vault Agent Configuration questions.