Which TWO statements are true when troubleshooting a failed Vault CLI command?
Trap 1: Run 'vault write' to test if the token can write to a path.
'vault write' mutates data, so using it as a diagnostic risks creating or overwriting secrets at the target path. It is tempting because a write does confirm token policy permissions, and it is the correct test when validating that a token can legitimately create a specific secret.
Trap 2: Run 'vault status' to check if the server is reachable.
'vault status' reports seal state and cluster health but returns successfully even when the caller's token is invalid or lacks policy permissions, so it cannot explain authorisation failures. It is the right first step when the server itself may be sealed, unreachable, or uninitialised.
Trap 3: Run 'vault read' to test if any secret is accessible.
A successful 'vault read' only proves that one specific path and token combination works; it does not verify server reachability or token validity generally, so it cannot isolate the failure. It is tempting because reading a known secret is a natural first sanity check when credentials look suspect.
- A
Run 'vault token lookup' to verify the token is valid and has the expected policies.
Token lookup returns the token's policies, TTL and renewal status, so an authentication or permission failure can be traced to an expired token or missing policy. This directly satisfies the stem's need to verify token validity and expected policies before retrying the command.
- B
Run 'vault write' to test if the token can write to a path.
Why it fails: 'vault write' mutates data, so using it as a diagnostic risks creating or overwriting secrets at the target path. It is tempting because a write does confirm token policy permissions, and it is the correct test when validating that a token can legitimately create a specific secret.
- C
Run 'vault login' to re-authenticate and obtain a new token if needed.
Re-authenticating issues a fresh token with a new TTL, resolving failures caused by an expired or revoked token. This satisfies the stem's troubleshooting requirement by restoring valid credentials before the command is retried against Vault.
- D
Run 'vault status' to check if the server is reachable.
Why it fails: 'vault status' reports seal state and cluster health but returns successfully even when the caller's token is invalid or lacks policy permissions, so it cannot explain authorisation failures. It is the right first step when the server itself may be sealed, unreachable, or uninitialised.
- E
Run 'vault read' to test if any secret is accessible.
Why it fails: A successful 'vault read' only proves that one specific path and token combination works; it does not verify server reachability or token validity generally, so it cannot isolate the failure. It is tempting because reading a known secret is a natural first sanity check when credentials look suspect.