Courseiva

CCNA Vault Agent Configuration Questions

23 questions · Vault Agent Configuration topic · All types, answers revealed

1
MCQmedium

You have configured the Vault Agent to authenticate using the Kubernetes auth method. Which parameter is used to point to the service account token file?

A.service_account_token
B.token_path
C.jwt_path
D.token_file
AnswerB

token_path is the correct parameter to define the location of the JWT.

Why this answer

The 'kubernetes_role' uses the 'token_path' parameter to find the service account token.

2
MCQhard

When configuring Vault Agent auto-auth with TLS, where should you place the CA certificate file?

A.In the 'tls_ca_cert' parameter.
B.As an environment variable.
C.In the 'cache' block.
D.In the 'listener' block.
AnswerA

This parameter identifies the CA certificate for server verification.

Why this answer

The CA certificate is specified in the 'tls_ca_cert' parameter within the 'auto_auth' block.

3
MCQmedium

You are using the Vault Agent Sinks to persist tokens. If the sink file is deleted manually, what is the default behavior of the Vault Agent?

A.The agent will re-create the sink file automatically.
B.The agent will attempt to re-authenticate immediately.
C.The agent will disable template rendering.
D.The agent will stop and exit with an error.
AnswerA

Vault Agent ensures the sink file exists to maintain token persistence.

Why this answer

The Vault Agent manages its own sink lifecycle and will automatically recreate the token file based on its internal state.

4
Multi-Selecthard

Which THREE functions are available for use within Vault Agent templates?

Select 3 answers
A.scratch
B.encrypt
C.rotate
D.secret
E.metadata
AnswersA, D, E

Provides a temporary storage area for template variables.

Why this answer

The 'secret', 'metadata', and 'scratch' functions are valid Vault template helpers.

5
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

Sinks enable token sharing via the filesystem.

Why this answer

Sinks allow the agent to write the retrieved token to a file, enabling other local processes to use it without needing to know the auth method.

6
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 is the standard signal for reloading configurations.

Why this answer

SIGHUP is the standard Unix signal used to trigger configuration reloads in many applications.

7
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

Required to specify the sink type.

Why this answer

The 'sink' block requires a 'type' and a 'config' map to define the file path.

8
MCQeasy

You are configuring a Vault Agent to authenticate via the AppRole method. Which configuration block is required to define the role ID and secret ID path for the agent?

A.auth_method
B.auto_auth
C.vault_agent
D.secrets
AnswerB

The auto_auth block handles the authentication process for the agent.

Why this answer

The auto_auth block is specifically used to configure the method by which the Vault Agent authenticates to the Vault server.

9
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

If no sink is defined, the token is kept in-memory and not written to disk.

10
MCQhard

You have multiple Vault Agent instances running in a cluster. You want to ensure they all use the same cache configuration. How can you share the cache configuration between them?

A.By setting 'shared_cache = true' in the configuration.
B.By mounting a shared volume.
C.It is not possible to share the cache.
D.By configuring a shared Redis backend.
AnswerC

Vault Agent caching is local to each individual agent process.

Why this answer

Vault Agent caching is local to the agent instance; it cannot be shared across different processes or nodes.

11
Multi-Selectmedium

Which THREE parameters are available in the 'vault' (top-level) block?

Select 3 answers
A.tls_skip_verify
B.method
C.role
D.address
E.ca_cert
AnswersA, D, E

Allows skipping TLS verification.

Why this answer

The top-level configuration defines connectivity to the Vault server.

12
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' block defines the address and port for the agent API.

Why this answer

The 'listener' block is used to configure how the Vault Agent exposes its local API for applications to communicate with.

13
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

The agent cache is all-or-nothing for the configured paths.

Why this answer

The 'cache' block does not have a parameter to disable specific requests; all requests are cached unless disabled globally.

14
MCQhard

If you are using Vault Agent templates to render a file, and the secret contains a newline, how can you ensure the output is correctly formatted in your template?

A.Use the 'raw' function.
B.Use the 'base64' function.
C.It is not possible to render multiline secrets.
D.Use the 'indent' function.
AnswerD

The 'indent' function in Go templates helps maintain formatting for secrets with newlines.

Why this answer

Vault templates use Go templating; the 'indent' function or specific formatting is often needed for multi-line secrets.

15
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 is a standard auto-auth method.

Why this answer

AppRole and Kubernetes are the most common methods used in Vault Agent auto-auth.

16
Multi-Selecthard

Which THREE configuration options are valid within the 'template' block?

Select 3 answers
A.command
B.destination
C.version
D.source
E.perms
AnswersB, D, E

Defines the rendered output path.

Why this answer

These are core parameters for controlling template rendering in Vault Agent.

17
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

5s is the minimum allowed render interval.

Why this answer

Vault enforces a minimum rendering interval to prevent excessive resource consumption; it is 5s.

18
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

File is a supported sink type.

Why this answer

Vault Agent supports 'file' sinks for local persistence.

19
MCQmedium

You are using Vault Agent templates to generate a configuration file. You need the template to include a secret from a KV v2 engine. What is the correct syntax within the template file?

A.{{ get "kv/config" }}
B.{{ secret "kv/data/config" }}
C.{{ vault_read "kv/config" }}
D.$vault.read("kv/config")
AnswerB

The 'secret' function retrieves data from the specified path.

Why this answer

The 'secret' function is used in Vault templates to retrieve data from KV engines.

20
MCQhard

When configuring Vault Agent caching, you notice that the cache is not effectively reducing requests. Which configuration parameter controls the lifespan of cached items?

A.max_ttl
B.ttl
C.expiry
D.cache_timeout
AnswerA

max_ttl sets the ceiling for cached items.

Why this answer

The 'max_ttl' parameter in the 'cache' block defines the maximum time an item can remain in the cache.

21
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 'role' parameter defines the Vault role to be used.

Why this answer

The 'role' parameter is mandatory to specify which Vault role the IAM identity should map to.

22
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 manages the token lifecycle, including renewal and rotation.

23
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

Signal triggers a reload process.

Why this answer

The change_mode supports 'noop', 'signal', and 'restart' actions.

Ready to test yourself?

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