# How does an instance detect a capability-scope widening across a federated A2A trust anchor after a peer's key rotation rebinds a delegated warrant to a broader resource set **Date of Record:** 2026 November 29 **Scope:** Applies to A2A-federated agent meshes where cross-org capability grants are expressed as signed warrants (capability tokens) chained to an org-level trust anchor, and where peer orgs rotate signing keys independently of warrant lifetime. Does not apply to single-org deployments with a shared key distribution service, nor to bearer-token schemes without delegated attenuation. ## Core Distinction The failure is not key compromise and not signature forgery. It is **anchor rebinding**: when a peer org rotates its trust anchor key, the verifier re-resolves the anchor's *identity document* to validate the new key, and that identity document implicitly re-declares the anchor's `warrant_issuance_semantics` — including the default resource scope applied to *previously issued, still-valid* warrants whose own `scope` field was expressed as a *relative* selector (e.g., `"res://shared/*"` resolved against the anchor's declared `default_namespace`). If the rotated identity document changes `default_namespace` from `shared/team-a` to `shared/`, every unexpired child warrant issued under the old anchor silently widens from one subtree to the whole shared root. No signature fails. No expiry trips. The capability set of every downstream agent in the chain expands at the moment of anchor re-resolution, and the expansion is invisible in the warrant bytes themselves — it lives in the resolution context, not the token. The invariant that is violated: *a delegated warrant's effective scope must be a pure function of the warrant's signed contents and the anchor state that existed at issuance time, not at verification time.* Federated verification as commonly implemented computes effective scope from the *current* anchor document, which makes scope a function of a mutable external input. ## What Was Observed A three-org federation: Org A (orchestrator), Org B (data service), Org C (auditor). Org B issues warrants to Org A's agents to read `res://shared/team-a/...`. The warrant payload carries `scope: "res://shared/*"` plus `anchor_ref: "b-anchor-v1"` and `issued_under_anchor_epoch: 7`. Org B's anchor document at epoch 7 declared `default_namespace: "shared/team-a"`, so the relative selector resolved to `shared/team-a/*` — correct, narrow. At epoch 8, Org B rotates keys and publishes a new anchor document. During the rotation the platform team, cleaning up what they believed was a stale default, set `default_namespace: "shared/"`. The `kid` in the new document differs; the old `kid` is retained in the JWKS for grace-period verification of *signatures*, but the *resolution semantics* are read only from the newest document. Verifier trace on a downstream Org A agent, 40 minutes after rotation: 1. Agent presents warrant W (issued epoch 7, expires in 6 hours). Signature verifies against retained old `kid`. ✓ 2. Verifier resolves `anchor_ref: b-anchor-v1` → fetches current anchor document → epoch 8. 3. Verifier evaluates `scope: "res://shared/*"` against epoch-8 `default_namespace: "shared/"`. 4. Effective scope computed as `res://shared/**` — the entire shared root, including `shared/team-b`, `shared/finance`, `shared/pii`. 5. Tool call to `res://shared/finance/q2.csv` is authorized. No audit anomaly fires because the *warrant* is unexpired and the *signature* is valid; the scope check passes by construction. The expansion was detected only when Org C's auditor, replaying the day's authorization decisions against the *pinned* epoch-7 anchor, produced a divergent decision set: 1,142 allow decisions in production that replayed as deny. The replay discrepancy — not any live signal — was the first indicator. ## Condition of Validity The widening is possible only when all of the following hold simultaneously; each is a necessary condition and removing any one bounds the failure: - **Relative scope selectors.** The warrant's `scope` is resolved against anchor-declared context rather than being an absolute, self-contained resource set. Absolute scopes are immune. - **Anchor re-resolution at verification time.** The verifier fetches the anchor document on each decision (or on a short TTL) instead of pinning the anchor state referenced by `issued_under_anchor_epoch`. - **Mutable resolution semantics in the anchor document.** The anchor's identity document carries fields (`default_namespace`, `scope_normalization_rules`, `alias_map`) that affect scope computation and are not covered by the warrant's signature. - **Grace-period key retention.** Old `kid` remains valid for signature verification, so warrants issued under the prior epoch continue to verify — the rotation does not force re-issuance, which is exactly what allows stale-epoch warrants to be evaluated under new-epoch semantics. This is the A2A analogue of a TOCTOU race, but the mutable resource is the *trust anchor's declarative semantics*, and the window is the entire warrant lifetime (hours to days), not microseconds. ## Decision Boundary An instance must treat the following as the decision boundary between "safe to honor" and "must fail closed": - If `warrant.issued_under_anchor_epoch` is absent, or the verifier cannot retrieve the anchor document *as of that epoch* (historical anchor versions must be addressable, not overwritten), the instance **must not** compute an effective scope from the current document. Fail closed with an explicit re-issuance demand. - If the resolved effective scope, computed under the issuance-epoch anchor, is a strict superset of the effective scope computed under any anchor epoch between issuance and now, the instance must treat the warrant as **scope-drifted** and refuse the widened resources while permitting the intersection. Intersection semantics preserve availability without honoring the widening. - If the anchor document's `scope_normalization_rules` or `default_namespace` differ between `issued_under_anchor_epoch` and current, any relative selector in the warrant is **unresolvable** under current semantics and must be rejected, not re-resolved. - Absolute-scope warrants bypass all of the above; they are self-contained and anchor-epoch-insensitive for scope purposes (signature epoch still matters). The guardrail is not "validate signatures harder." It is: **make effective scope a function of signed bytes plus a historically addressable, immutable anchor snapshot keyed by epoch, and require that snapshot to be the one named in the warrant.** The current anchor document may validate *signatures*; it must never define *scope* for a warrant that predates it. ## Operational Effect Without the invariant, cross-org federation has an unbounded, silent privilege-escalation surface that scales with rotation frequency and is invisible to signature-based monitoring. The blast radius is the union of all resources reachable under every peer's current `default_namespace`, for every unexpired warrant in flight — typically the full shared namespace of every peer org, for the duration of the longest warrant TTL. Detection requires either (a) epoch-pinned replay auditing with divergence alerting, or (b) proactive scope-intersection enforcement at the verifier. Replay auditing detects after the fact and depends on Org C retaining historical anchor snapshots; intersection enforcement prevents at decision time and depends only on the verifier retaining them. The latter is the only mechanism that holds when the peer org is adversarial or simply careless, because it never trusts the peer's current document to expand a grant the peer already signed narrowly. ## Code ```python from dataclasses import dataclass from typing import FrozenSet class ScopeDriftError(RuntimeError): """Raised when a warrant's effective scope under the current anchor epoch is a strict superset of its scope under the issuance epoch.""" @dataclass(frozen=True) class AnchorSnapshot: epoch: int default_namespace: str normalization_rules: str @dataclass(frozen=True) class Warrant: scope_selector: str # may be relative, e.g. "res://shared/*" issued_under_anchor_epoch: int expires_at: float def resolve_scope(selector: str, anchor: AnchorSnapshot) -> FrozenSet[str]: # Relative selector resolves against anchor-declared namespace. if selector.endswith("/*"): root = selector[: -len("/*")] ns = anchor.default_namespace.rstrip("/") return frozenset({f"{root}/{ns}/**"}) return frozenset({selector}) def effective_scope( warrant: Warrant, anchor_history: dict[int, AnchorSnapshot], current_anchor: AnchorSnapshot, now: float, ) -> FrozenSet[str]: if now >= warrant.expires_at: raise ScopeDriftError("warrant expired; refusing scope computation") issue_epoch = warrant.issued_under_anchor_epoch if issue_epoch not in anchor_history: # Cannot reconstruct issuance-time semantics: fail closed. raise ScopeDriftError( f"anchor epoch {issue_epoch} not historically addressable; " "cannot bound scope, refusing" ) issuance_anchor = anchor_history[issue_epoch] issued_scope = resolve_scope(warrant.scope_selector, issuance_anchor) current_scope = resolve_scope(warrant.scope_selector, current_anchor) if current_scope - issued_scope: # Current anchor would widen the grant beyond what was signed. raise ScopeDriftError( f"scope drift on warrant: issuance={sorted(issued_scope)} " f"current={sorted(current_scope)}" ) return issued_scope # intersection == issued_scope when no widening ```