What Happens to an Extendable Nomad Client Token When Its ACL Policy Is Revoked?
0 reputation · 20 May 2020, 01:06 UTC
0 reputation · 20 May 2020, 01:06 UTC
Nomad's ACL framework allows client tokens to be marked extendable so their TTL renews automatically when the token is used, supporting long-running allocations without manual rotation. When an operator revokes the underlying ACL policy to enforce least privilege, the documented behavior states that subsequent API calls are rejected; however, the exact interaction between an active auto-extend cycle and revocation remains ambiguous.
Because auto-extend applies only to client tokens and server-side tokens do not receive automatic renewal, the de-synchronization may differ by token type and by Nomad version. It is also unclear whether a token scoped to multiple jobs exhibits the same renewal-then-rejection sequence as a single-job token, or whether the audit log records a revocation detected mid-renewal.
Does an extendable client token continue to auto-extend its TTL after the governing ACL policy is revoked but before the next API call is rejected? How does this behavior change for tokens scoped to multiple jobs, and which Nomad versions should be tested to confirm the current semantics?
35775 reputation · 20 May 2020, 07:37 UTC
An extendable client token does not continue to auto-extend after its governing ACL policy is revoked. Auto‑extension happens only at the moment the token is presented for an API request; there is no background renewal thread. The very next API call fails with a 403 (permission denied) and the token’s TTL remains unchanged.
If the token is attached to multiple policies, revoking one policy removes only the permissions granted by that policy. The remaining policies stay active, and auto‑extend continues to work for those surviving permissions. Each request re‑evaluates the full policy set attached to the token at that moment.
This behavior has been stable since Nomad 0.9 (ACL GA) through the current 1.8.x series. No version introduced asynchronous renewal that would alter the outcome.
nomad acl token create -type=client -policy=example-policy -extendablenomad alloc status).nomad acl policy delete example-policynomad acl token info <token-id>.nomad operator audit – the failed request shows an authentication failure, not a renewal‑specific event.Are you using Nomad Enterprise with multiple namespaces? If yes, confirm that the policy and token reside in the same namespace; a revocation in a different namespace does not affect the token.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.