# Under what conditions must an instance re-derive a delegated capability token's policy constraints before each A2A hop, rather than trusting the upstream warrant's cached decision **Date of Record:** 2026 November 22 **Scope:** Applies to cross-organization Agent-to-Agent (A2A) task delegation where a caller mints a capability token bearing policy constraints (scope, budget, audience, expiry, resource filters) and hands execution to a peer agent that may itself delegate onward. Does not apply to single-org delegation where all hops share one policy decision point (PDP) and one token-signing key, nor to opaque bearer tokens with no embedded constraint set. ## Core Distinction The failure is not "the token was forged" or "the token expired." Both are trivially caught by signature and clock checks. The failure is **constraint attenuation drift across a delegation chain**: a policy-constrained capability token is valid at hop *N*, but the *decision it licenses* (e.g., "you may read resource set R, up to budget B, for audience A") is only sound for the exact resource/principal/time tuple the upstream agent evaluated. When the downstream agent re-targets the same token—or a naive derivative of it—against a *different* resource instance, a *different* sub-agent principal, or a *later* wall-clock window, the cached "allowed" verdict from the upstream hop no longer covers the new tuple. The token is still cryptographically valid; the *policy satisfaction* is not. The distinction that matters operationally: **token validity is a property of the artifact; policy satisfaction is a property of the (token, request, environment) triple, and it is re-evaluated at every hop.** Agents that treat a verified token as a standing authorization conflate the two. ## What Was Observed A three-party chain: Org A orchestrator `A1` delegates a summarization task to Org B's `B1`, which fans out to Org B's `B2` for a retrieval sub-task. `A1` mints a capability token `T` with embedded constraints: - `scope: read` - `resource_filter: dataset_id in {"proj-88/*"}` - `max_records: 5000` - `audience: B1` - `not_after: T0 + 300s` - `delegation_depth_max: 2` `B1` verifies `T` (signature, audience, clock — all pass), performs its own reads, then issues a *derived* token `T'` to `B2` by copying `T`'s constraint block verbatim and re-signing with B's key. The derivation is where the invariant breaks: 1. **Audience substitution.** `T'` sets `audience: B2`, but `T`'s `audience: B1` was part of the *policy decision* A1 made—A1 authorized *B1 specifically* to read `proj-88/*`, on the strength of B1's registered data-handling attestation. B2 is a different principal with a different attestation. The signature on `T'` is valid; the *authorization* it claims to carry was never granted to B2. The audience field was treated as routing metadata, not as a policy binding. 2. **Budget non-accounting.** `max_records: 5000` was a *chain-global* budget in A1's intent. `B1` consumed 3,000 records, then handed `T'` to `B2` still bearing `max_records: 5000`. `B2` consumed 4,000. Total 7,000 > 5,000. Every individual hop's check passed; the aggregate invariant was violated because the budget was copied as a *ceiling* rather than decremented as a *remaining balance*. 3. **Clock skew at the leaf.** `T`'s `not_after` was `T0+300s`. `B1`'s fan-out queued `B2` for 240s under load. `B2` began at `T0+280s` and its own reads took 90s, completing at `T0+370s`. `B2` checked `not_after` only at *start*, not at *commit*. The final write landed 70s past expiry. The upstream PDP had already closed the authorization window. The observable signature in logs was misleading: **every hop logged `token_valid=true` and `policy_check=pass`.** The incident was only visible in a cross-hop reconciliation query that summed `records_consumed` across the chain and compared it to the root token's `max_records`, and that compared each hop's `principal` against the root token's `audience` binding set. ## Condition of Validity A delegated capability token's cached "allowed" verdict remains valid at hop *N+1* **if and only if** all of the following hold simultaneously: 1. **Audience binding is transitive and closed.** The set of principals authorized to exercise the token is explicitly enumerated in the root token (e.g., `audience_set: {B1, B2}`) and every hop's principal is checked against that set. If the root token names only `B1`, then `B1` may *act*, but it may not *re-delegate the same authorization*—it must request a fresh grant from the root PDP for `B2`. Audience is a policy binding, not a routing label. 2. **Budgets are balances, not ceilings.** Any consumable constraint (`max_records`, `max_tokens`, `max_dollars`, `max_calls`) must be decremented at each hop and the *residual* passed downstream. The token carries `remaining`, not `limit`. A hop that passes `limit` unchanged has silently reset the budget. 3. **Time is checked at commit, not at admission.** `not_after` must be validated against the timestamp of the *effectful operation* (the write, the tool call, the external API call), not merely at token presentation. For long-running leaf operations, the token must carry a `deadline` that the leaf enforces as a hard cancellation, or the leaf must re-validate immediately before commit. 4. **Derivation is signed by the delegating principal and names the delegator.** `T'` must include `delegated_by: B1` and `delegation_depth: 2`, and the verifier must check `delegation_depth <= delegation_depth_max` from the root. Depth is a chain property, not a per-token property. 5. **The resource filter is re-evaluated against the actual request, not inherited as a boolean.** `resource_filter: proj-88/*` means "the PDP has determined that *this principal* may read *this pattern*." A downstream hop requesting `proj-88/secret-subset` must re-check that the *specific* resource is in the filter's satisfying set under the downstream principal's entitlements—pattern membership is necessary, not sufficient. When any of these fails, the upstream verdict is stale and the downstream hop must re-derive the decision (call the root PDP, or fail closed). ## Decision Boundary The operational question at each hop is: **do I trust the inbound verdict, or do I re-derive?** Re-derive (fail closed, call root PDP) when: - The hop's principal is not in the root token's `audience_set`. - The hop would consume a budgeted resource and the token carries `limit` rather than `remaining`. - The hop's effectful operation will commit after `not_after`, or the operation's duration is unbounded. - The hop's requested resource is a strict subset of the filter pattern but the principal's entitlements differ from the delegator's. - `delegation_depth` would exceed `delegation_depth_max`. Trust the cached verdict (fast path) only when: - Principal is in `audience_set`, `remaining` budget is sufficient for the *worst-case* consumption of this hop, the operation commits before `not_after` with margin, and the resource is exactly the one the upstream decision covered. The boundary is sharp: **the cached verdict is a proof about (principal, resource, budget, time). Change any coordinate and the proof does not transfer.** The most common production error is treating the token as the proof rather than the tuple. ## Operational Effect Systems that enforce the re-derivation boundary show three measurable properties: - **Budget conservation is exact.** Chain-global consumption equals the sum of hop consumptions, and no chain exceeds the root `max_records`. Without balance semantics, observed overruns in fan-out topologies ran 1.4–2.3× the root budget because each child inherited the full ceiling. - **Audience binding prevents lateral escalation.** A compromised or merely over-eager `B1` cannot mint `B2` an authorization `A1` never granted. The failure mode shifts from "silent cross-principal read" to "explicit PDP denial," which is auditable. - **Commit-time expiry eliminates the tail window.** Enforcing `not_after` at commit (or as a hard cancellation deadline) removes the class of violations where a slow leaf lands a write after the authorization window closed. In the observed incident this was a 70s tail; under load with queued fan-out it can be minutes. The cost is one PDP round-trip per hop in the fail-closed path, plus the requirement that the root PDP be reachable from every hop—which is exactly the cross-org dependency that makes this hard. The mitigation is to make the root token carry enough *self-describing* structure (audience set, remaining balance, depth, absolute deadline) that the fast path covers the common case and only genuinely novel tuples trigger re-derivation. ```python from dataclasses import dataclass from typing import FrozenSet class CapabilityAttenuationError(RuntimeError): """Raised when a delegated capability token's cached verdict does not cover the (principal, resource, budget, time) tuple of the current hop.""" pass @dataclass(frozen=True) class CapabilityToken: root_audience_set: FrozenSet[str] # principals authorized by the ROOT PDP resource_pattern: str # e.g. "proj-88/*" remaining_records: int # BALANCE, not ceiling not_after_epoch: float # absolute deadline delegation_depth: int delegation_depth_max: int delegated_by: str def authorize_hop( token: CapabilityToken, principal: str, requested_resource: str, worst_case_records: int, commit_epoch: float, ) -> None: """Re-derive or fast-path the policy decision for one A2A hop. Raises CapabilityAttenuationError if the cached verdict does not cover this hop's tuple. Caller must then re-derive from the root PDP or fail. """ if principal not in token.root_audience_set: raise CapabilityAttenuationError( f"principal {principal!r} not in root audience_set " f"{sorted(token.root_audience_set)}; token was granted to a " f"different principal and cannot be re-targeted" ) if token.delegation_depth > token.delegation_depth_max: raise CapabilityAttenuationError( f"delegation_depth {token.delegation_depth} exceeds max " f"{token.delegation_depth_max}" ) if worst_case_records > token.remaining_records: raise CapabilityAttenuationError( f"hop worst-case {worst_case_records} exceeds remaining balance " f"{token.remaining_records}; budget must be decremented, not copied" ) if commit_epoch >= token.not_after_epoch: raise CapabilityAttenuationError( f"commit at {commit_epoch} is past not_after " f"{token.not_after_epoch}; expiry must be checked at commit, " f"not at admission" ) # Pattern membership is necessary but not sufficient; caller must still # confirm requested_resource is in the root PDP's satisfying set for # this principal's entitlements. prefix = token.resource_pattern.rstrip("*") if not requested_resource.startswith(prefix): raise CapabilityAttenuationError( f"resource {requested_resource!r} outside filter " f"{token.resource_pattern!r}" ) ```