# Which invariants prevent silent privilege amplification when a federated agent re-derives delegated capability from a stale policy snapshot **Date of Record:** 2026 November 25 **Scope:** Applies to cross-org agent federation where agent A in org X delegates a scoped capability to agent B in org Y, and B (or a downstream C) re-evaluates that capability against a cached policy bundle rather than the delegating authority's live policy state. Does not apply to single-org intra-tenant delegation where a shared policy engine is the sole authority. ## Core Distinction The failing assumption is that *capability negotiation* and *capability authorization* are the same event. In a federated handoff, agent B receives a capability token (a signed grant naming an action, a resource, a scope predicate, and an expiry) and separately receives, or already holds, a policy bundle from org X that says what X's principals may delegate. These two artifacts are produced at different times, signed by different keys, and refreshed on different schedules. When B validates the grant, it typically checks the *token* signature and expiry — cheap, local, deterministic. It does not re-fetch X's live policy, because that would couple every delegated call to a cross-org round trip. Instead it evaluates the grant against a *cached* policy bundle. The boundary condition is this: the grant is valid, the cached policy is valid, and the composition of the two authorizes an action that X's *current* policy forbids. Nothing in the token or the cache is individually wrong. The privilege amplification lives entirely in the skew between the two. This is distinct from token replay or signature forgery. Every cryptographic check passes. The failure is a *temporal* one: a capability that was legitimately derivable at delegation time remains derivable after the delegating policy has narrowed, because the narrowing never propagates into the verifier's evaluation. ## What Was Observed A federation of three orgs — X (delegator), Y (broker), Z (executor) — with a two-hop delegation: X grants Y `data.read(region=eu)` scoped to a customer set; Y re-delegates a subset to Z. Policy bundles are distributed as signed snapshots with a TTL of 30 minutes and a monotonic `policy_version`. Grants carry a `delegation_epoch` referencing the `policy_version` under which they were minted. The observed trace: 1. At `policy_version=411`, X's policy permits `data.read(region=eu)` for any customer in set S. X mints a grant to Y with `delegation_epoch=411`. 2. Y caches bundle 411 and re-delegates to Z, embedding `delegation_epoch=411` and Y's own attenuation (customer subset S′ ⊂ S). 3. At `policy_version=412`, X's compliance team narrows the policy: customer `c_77 ∈ S` is moved to `region=us` only. Bundle 412 is published and signed. 4. Z executes a read for `c_77` at wall-clock time 20 minutes into the 30-minute cache TTL. Z's verifier evaluates the grant against its *cached* bundle 411 — which still classifies `c_77` as `eu`-eligible — and the read succeeds. 5. X's audit log, evaluated against live policy 412, records the read as a violation. The critical observation: the verifier's check `grant.delegation_epoch <= cached_bundle.policy_version` passed, because `411 <= 411`. The check was *intended* to ensure the grant was not minted under a future policy. It did not ensure the grant was minted under a policy that is still current. The epoch check was a lower bound masquerading as an equality invariant. A second, subtler trace: Y's cache and Z's cache refreshed at different offsets. Z refreshed to 412 at minute 18; Y was still on 411. Y re-delegated a *new* grant at minute 19 stamped `delegation_epoch=411`, which Z — now on 412 — rejected as stale. The rejection was correct but produced a spurious handoff failure that operators initially diagnosed as a signature problem, because the error surfaced at the crypto layer's "epoch mismatch" branch rather than a policy branch. ## Condition of Validity The invariant that must hold for federated delegation to be sound is a *monotonic epoch binding*, not a bound check: > A grant is evaluable by a verifier if and only if the verifier's live policy version equals the grant's `delegation_epoch`, OR the verifier can prove that no policy change between `delegation_epoch` and its live version *widens* the grant's effective scope. The second clause is the escape hatch that makes this practical: policy changes that only *narrow* scope are safe to evaluate against the older epoch, because the grant's authorized set is a subset of what the old policy allowed and a subset of what the new policy allows. Policy changes that *widen* or *reclassify* (as `c_77`'s region move did — it widened `us` eligibility while narrowing `eu`) break the subset relation and must force re-derivation. This requires policy bundles to be *diffable* and for the diff to be classified as narrowing, widening, or neutral per resource class. A bundle that is only a signed blob of rules, with no machine-comparable structure, cannot support this check and must fall back to strict epoch equality — which means every policy publish invalidates every outstanding grant, a correctness-preserving but availability-destroying choice. The condition of validity also requires that the `delegation_epoch` be bound into the signed grant body, not carried as a side channel. In the failing trace, the epoch was in the grant's claims, but the verifier treated it as advisory metadata. If it is not covered by the signature over the *authorization decision* (not just over the bytes), a broker can re-stamp it. ## Decision Boundary The operational fork is between two verifier behaviors at the moment a grant's epoch does not equal the live policy version: - **Strict mode:** reject any grant whose epoch is not the live version. Sound, but every policy publish is a federation-wide grant revocation event. Acceptable only when policy publishes are rare and grants are short-lived relative to publish cadence. - **Diff-mediated mode:** accept a stale-epoch grant only if the verifier can obtain a signed, ordered policy diff from epoch to live and prove the diff is narrowing-or-neutral for the grant's resource class. Requires the delegating org to publish diffs, not just snapshots, and requires the verifier to trust the diff's completeness. The boundary is crossed when an org publishes snapshots without diffs *and* the verifier is configured in diff-mediated mode with a permissive fallback ("if no diff available, accept within TTL"). That fallback reconstructs exactly the failing trace: no diff is available because X only ships snapshots, so the verifier falls back to TTL, and TTL is precisely the window in which the skew is exploitable. The permissive fallback must be *reject*, not *accept*, or the mode is theater. A secondary boundary governs cache refresh ordering across hops. If Y re-delegates while on an older epoch than Z, the resulting grant is dead on arrival at Z. The fix is not to loosen Z; it is to require that a broker refresh to the live epoch *before* minting any downstream grant, and to stamp the grant with the broker's post-refresh epoch. A broker that mints from a cached epoch is minting a grant it cannot guarantee is evaluable. ## Operational Effect The practical consequence is that federated delegation soundness depends on a property no single org controls: the *publish discipline* of the delegating org and the *diff availability* at the verifying org must be jointly sufficient. An org that publishes only snapshots silently degrades every downstream verifier that relies on diff-mediated evaluation into TTL-bounded trust, and TTL-bounded trust is privilege amplification with a timer. Two guardrails bound the damage: 1. **Epoch equality on the authorization decision.** The verifier must treat `delegation_epoch` as a signed claim over the decision, and must refuse to evaluate a grant whose epoch it cannot reconcile with live policy by either equality or a proven narrowing diff. TTL is not a reconciliation. 2. **Broker refresh-before-mint.** A broker must not mint a downstream grant from a cached epoch. It refreshes, then mints, and the mint fails closed if refresh fails. The residual risk is the reclassification case: a policy change that is neither purely narrowing nor purely widening for a resource class, because the resource's classification itself moved. These must be treated as widening for safety, since the verifier cannot prove subset membership across a reclassification without re-deriving the grant. The invariant that survives is narrow but honest: *a grant is only as current as the policy diff its verifier can prove, and absence of proof is denial, not delay.* ```python import hashlib from dataclasses import dataclass from enum import Enum class DelegationEpochMismatch(RuntimeError): """Raised when a grant's epoch cannot be reconciled with live policy.""" class DiffClass(Enum): NARROWING = "narrowing" NEUTRAL = "neutral" WIDENING = "widening" RECLASSIFICATION = "reclassification" # treated as widening @dataclass(frozen=True) class Grant: action: str resource_class: str delegation_epoch: int signed_decision_digest: str @dataclass(frozen=True) class PolicyDiff: from_epoch: int to_epoch: int resource_class: str classification: DiffClass signed: bool def reconcile(grant: Grant, live_epoch: int, diffs: list[PolicyDiff]) -> None: """Enforce monotonic epoch binding for a federated grant. Accepts only when the grant epoch equals live policy, or when a signed, contiguous chain of diffs proves the change is narrowing-or-neutral for the grant's resource class. Absence of proof is denial. """ if grant.delegation_epoch == live_epoch: return if grant.delegation_epoch > live_epoch: raise DelegationEpochMismatch( f"grant epoch {grant.delegation_epoch} is ahead of live {live_epoch}; " "possible forged epoch or clock skew" ) applicable = sorted( (d for d in diffs if d.resource_class == grant.resource_class and grant.delegation_epoch < d.to_epoch <= live_epoch), key=lambda d: d.to_epoch, ) expected = grant.delegation_epoch for d in applicable: if d.from_epoch != expected: raise DelegationEpochMismatch( f"non-contiguous diff chain: expected from_epoch {expected}, " f"got {d.from_epoch}" ) if not d.signed: raise DelegationEpochMismatch( f"unsigned diff {d.from_epoch}->{d.to_epoch} cannot be trusted" ) if d.classification in (DiffClass.WIDENING, DiffClass.RECLASSIFICATION): raise DelegationEpochMismatch( f"diff {d.from_epoch}->{d.to_epoch} is {d.classification.value}; " "grant must be re-derived, not reconciled" ) expected = d.to_epoch if expected != live_epoch: raise DelegationEpochMismatch( f"diff chain ends at {expected}, live policy is {live_epoch}; " "no proof of narrowing, deny" ) def mint_downstream(broker_cached_epoch: int, live_epoch: int, action: str, resource_class: str) -> Grant: """A broker must refresh before minting; minting from a stale epoch is banned.""" if broker_cached_epoch != live_epoch: raise DelegationEpochMismatch( f"broker on epoch {broker_cached_epoch} cannot mint against live " f"{live_epoch}; refresh required before delegation" ) digest = hashlib.sha256(f"{action}:{resource_class}:{live_epoch}".encode()).hexdigest() return Grant(action, resource_class, live_epoch, digest) ```