003 · Domain 7: Vault architecture fundamentals · 8% of the exam
Task 7.3: Configure environment variables
VAULT_ADDR, VAULT_TOKEN, VAULT_NAMESPACE, VAULT_CACERT, VAULT_SKIP_VERIFY, VAULT_FORMAT and others, their defaults, and how flags override them.
Study it
CLI environment variables
Lesson coming
Sample questions
Try each one before opening the answer. Every option is explained, with the HashiCorp documentation page that proves it.
Question 1 · choose 1
A user sets VAULT_ADDR=https://vault.internal:8200, and vault status fails with x509: certificate signed by unknown authority. The server's certificate comes from the company's private CA, saved as ca.pem. TLS verification must stay on. What should the user set?
AVAULT_SKIP_VERIFY to 1
BVAULT_CLIENT_CERT to the path of ca.pem
CVAULT_CACERT to the path of ca.pem
DVAULT_TLS_SERVER_NAME to vault.internal
Show the answer and why
AVAULT_SKIP_VERIFY to 1
Incorrect
That turns verification off, which the requirement forbids and which HashiCorp says not to use in production.
BVAULT_CLIENT_CERT to the path of ca.pem
Incorrect
VAULT_CLIENT_CERT supplies a client certificate for mutual TLS; it does not add a trusted CA.
CVAULT_CACERT to the path of ca.pem
Correct
VAULT_CACERT names a PEM CA certificate the CLI uses to verify the server's certificate.
DVAULT_TLS_SERVER_NAME to vault.internal
Incorrect
This sets the SNI name for the handshake; it does not make the private CA trusted.
Trust a private CA with VAULT_CACERT; keep VAULT_SKIP_VERIFY for throwaway labs only.
An engineer works in the admin namespace of an HCP Vault Dedicated cluster and is tired of adding -namespace=admin to every command. Which variable helps?
AVAULT_NAMESPACE=admin
BVAULT_ADDR=https://<cluster>/admin
CVAULT_TOKEN=admin
DVAULT_FORMAT=admin
Show the answer and why
AVAULT_NAMESPACE=admin
Correct
VAULT_NAMESPACE sets the namespace for CLI commands, allowing paths relative to it.
BVAULT_ADDR=https://<cluster>/admin
Incorrect
The namespace is not part of the address path.
CVAULT_TOKEN=admin
Incorrect
That would set a token value, not a namespace.
DVAULT_FORMAT=admin
Incorrect
That variable does not set a namespace.
HCP Vault Dedicated clusters use admin as their top-level namespace.