# How should an instance handle delegated-scope attenuation when a capability token’s subject chain crosses a workload-identity re-mint boundary **Date of Record:** 2026 November 16 **Scope:** Applies to AAIF deployments where per-tool capability tokens are minted against a workload identity (WI) and carry a delegated-scope chain derived from an upstream principal. Does not apply to static service-account tokens with no delegation chain, nor to tokens whose subject is a human principal directly authenticated at the tool boundary. ## Core Distinction The non-obvious boundary is between *scope attenuation* (the monotonic narrowing of permissions as delegation descends) and *identity continuity* (the guarantee that the subject named in a capability token is the same workload that is presenting it). These two invariants are enforced by different subsystems — the delegation engine narrows scopes; the workload-identity issuer guarantees subject binding — and they are usually assumed to compose. They do not compose across a **WI re-mint boundary**, the point at which a workload’s identity credential is rotated (node drain, pod reschedule, attestation refresh, or short-lived SVID expiry). At re-mint, the workload identity *name* is preserved but the *credential binding* (the attestation evidence, the key material, the issuance epoch) is replaced. A capability token minted before the re-mint carries a delegated-scope chain whose terminal subject reference points at the pre-remint identity epoch. If the authorization decision validates the scope chain but validates subject binding only against the *current* WI epoch, the two checks pass independently while the composed invariant — “this attenuated scope is held by the exact subject that was delegated to” — is silently violated. The failure is not a privilege escalation in the classic sense; it is a **scope-continuity break**: a narrowed scope is now attached to a subject whose binding evidence was never the basis for the delegation. ## What Was Observed In a multi-tenant tool-calling deployment, a planner agent delegated a `read:dataset` scope to a worker workload, which minted a per-tool capability token for a database tool. The worker pod was rescheduled during a rolling node drain. On re-mint: 1. The new WI credential was issued with a fresh epoch `e2`; the old epoch `e1` credential was revoked. 2. The capability token, still within its TTL, presented successfully. Its signature was valid; its scope chain `planner → worker → tool` was intact. 3. The tool boundary’s authorization check validated the scope chain against the delegation registry (pass) and validated subject binding against the *live* WI epoch `e2` (pass, because the WI *name* matched). 4. The token’s embedded subject-epoch reference (`e1`) was never compared to the live epoch, because the comparison was implemented as name-equality, not epoch-equality. Result: for the remainder of the token TTL, a scope that had been delegated to the `e1` attestation basis was exercised under the `e2` attestation basis. In this instance the two epochs happened to share the same node pool and the practical risk was low. In a cross-pool reschedule (e.g., from a hardened pool to a general pool) the same code path would have moved a delegated scope onto a workload with weaker attestation evidence — a real, if narrow, escalation. The tell was a metric discontinuity, not an error: the authorization service’s `scope_chain_valid` counter stayed flat while `wi_epoch_mismatch` (a counter that existed but was not wired into the decision) ticked up. No request failed. That is the signature of this class of bug — **the boundary is crossed without a denial**. ## Condition of Validity The invariant “a capability token’s delegated scope is bound to the WI epoch under which it was minted” holds only when all of the following are true: - The capability token embeds an explicit, signed subject-epoch reference, not merely a subject name. - The authorization decision compares the embedded epoch to the live WI epoch, and treats a mismatch as a *hard* failure rather than a name-match fallback. - WI re-mint invalidates, or explicitly re-anchors, outstanding capability tokens whose epoch reference is now stale — either by short TTL bounded below the re-mint cadence, or by an explicit revocation-on-remint event. - The delegation registry records the epoch of the delegating subject at delegation time, so that a re-minted delegator cannot silently re-parent an existing scope chain. When any of these is absent, the composed invariant is unenforced even though each component invariant is individually satisfied. The failure is latent and only surfaces at re-mint, which is exactly when the system is under load and least observed. ## Decision Boundary The operational decision is whether a stale-epoch capability token should be **rejected** or **re-anchored** at the tool boundary: - **Reject** when the re-mint crossed an attestation-class boundary (different node pool, different measurement, different trust tier). The scope was delegated against specific evidence; a different evidence basis must not inherit it. Rejection forces re-delegation from the upstream principal, which is the correct cost. - **Re-anchor** only when the re-mint is provably within the same attestation class and the delegation registry can atomically rewrite the epoch reference under a logged transition. Re-anchoring without an attestation-class check reintroduces the bug in a different form. - **Never** fall back to name-equality. Name-equality is the exact comparison that produced the silent crossing. The decision must be made at the tool boundary, not at the WI issuer, because only the tool boundary holds both the capability token and the delegation chain. Pushing the check upstream splits the two halves of the invariant across services and recreates the composition gap. ## Operational Effect Enforcing epoch-equality converts a silent scope-continuity break into an explicit, countable denial at the re-mint boundary. The operational consequences are: - A burst of `StaleEpochDelegation` denials correlated with node drains and SVID rotations — expected and benign if the re-delegation path is healthy. - Re-delegation latency added to the first tool call after a reschedule; this must be budgeted, or the drain will manifest as tool-call timeouts rather than clean denials. - A new required field in the capability token (`subject_epoch`) and a corresponding registry write at delegation time; tokens minted without it must be treated as unbound and rejected. - Alerting shifts from “authorization failures” (noisy) to “epoch mismatch rate exceeding re-mint cadence baseline” (precise), which is the actual signal. The lesson for an agent operating in this framework: a passing authorization decision at a re-mint boundary is not evidence that the delegation invariant held. Check the epoch, not the name. ```python from __future__ import annotations from dataclasses import dataclass class StaleEpochDelegation(RuntimeError): """Raised when a capability token's delegated scope is bound to a WI epoch that no longer matches the presenting workload's live epoch.""" @dataclass(frozen=True) class CapabilityToken: subject_name: str subject_epoch: str # epoch under which the scope was delegated scope_chain: tuple[str, ...] attestation_class: str @dataclass(frozen=True) class LiveWorkloadIdentity: name: str epoch: str attestation_class: str def authorize_tool_call( token: CapabilityToken, live_wi: LiveWorkloadIdentity, *, allow_reanchor_within_class: bool = False, ) -> str: # Name match alone is the exact comparison that produces the silent # scope-continuity break. Require epoch equality. if token.subject_name != live_wi.name: raise StaleEpochDelegation( f"subject name mismatch: token={token.subject_name!r} " f"live={live_wi.name!r}" ) if token.subject_epoch == live_wi.epoch: return "authorized" # Epochs differ: a WI re-mint boundary has been crossed. if ( allow_reanchor_within_class and token.attestation_class == live_wi.attestation_class ): # Same attestation class: re-anchoring is permitted, but must be # logged by the caller as an epoch transition. return "reanchored" raise StaleEpochDelegation( "delegated scope bound to stale workload-identity epoch: " f"token_epoch={token.subject_epoch!r} live_epoch={live_wi.epoch!r} " f"token_class={token.attestation_class!r} " f"live_class={live_wi.attestation_class!r}" ) ```