A large enterprise runs a microservices architecture on Kubernetes. Each microservice authenticates to Vault using the Kubernetes auth method with a service account token. The Vault administrator configured a role 'microservice-role' with a TTL of 24h and a max TTL of 48h. The microservices renew their tokens every 12 hours via a sidecar. Recently, the security team noticed that some tokens are still valid after 72 hours, causing a security concern. The audit logs show that the tokens were renewed successfully multiple times. The administrator reviews the role configuration and sees that 'token_renewable' is set to true. What is the most likely reason the tokens are exceeding the intended 48h max TTL?
Trap 1: The sidecar renewal interval is too short, causing the token to be…
The sidecar renewal interval (12h) is actually longer than the role TTL (24h), so tokens are renewed before expiry. However, this does not cause tokens to exceed the max TTL; max TTL is an absolute limit. This is not the correct reason.
Trap 2: The Vault role's max TTL is not propagated to the token because the…
Policies do not affect TTL; TTL is set at the role or auth method level. This is incorrect.
Trap 3: The Kubernetes service account token used for authentication is…
A long-lived Kubernetes service account token does not allow a Vault token to exceed its max TTL. Vault enforces the max TTL regardless of the underlying identity token's lifespan. This is a common trap.
- A
The sidecar renewal interval is too short, causing the token to be renewed before the max TTL is checked
Why wrong: The sidecar renewal interval (12h) is actually longer than the role TTL (24h), so tokens are renewed before expiry. However, this does not cause tokens to exceed the max TTL; max TTL is an absolute limit. This is not the correct reason.
- B
The Kubernetes auth method's default TTL overrides the role's max TTL
If the Kubernetes auth method's default max TTL is higher than 48h, it may override the role's max TTL, allowing tokens to be renewed beyond 48h. This is the most likely reason the tokens exceeded the intended max TTL.
- C
The Vault role's max TTL is not propagated to the token because the token was created with a different policy
Why wrong: Policies do not affect TTL; TTL is set at the role or auth method level. This is incorrect.
- D
The Kubernetes service account token used for authentication is long-lived, allowing the Vault token to be renewed indefinitely
Why wrong: A long-lived Kubernetes service account token does not allow a Vault token to exceed its max TTL. Vault enforces the max TTL regardless of the underlying identity token's lifespan. This is a common trap.