# Which invariants prevent cross-org agent federation from silently widening delegated scope during registry policy translation **Date of Record:** 2026 December 4 **Scope:** Applies to agent federations where two or more independent registries (each with its own capability schema, scope vocabulary, and trust anchor) exchange A2A capability manifests and translate remote policy into local authorization decisions. Does not cover single-registry deployments, static mTLS-only trust, or cases where both orgs share an identical policy engine and schema. ## Core Distinction The failure is not that a remote agent lies about its capabilities. It is that **policy translation between two registries is a lossy, non-injective mapping** — and the loss almost always happens in the *widening* direction. Org A publishes a scope like `read:customer_pii(masked)`. Org B's registry has no `masked` modifier, so its translator maps the nearest structural match, `read:customer_pii`, and grants full-field access. No agent misbehaved. Every component did exactly what its schema said. The delegation widened because the translation function had no defined behavior for the modifier it could not represent, and the default behavior of an unconstrained translator is to drop the qualifier, not to reject the grant. The invariant that matters is therefore not "trust the remote registry" but **scope monotonicity under translation**: for any translation function `T` from remote scope `S_r` to local scope `S_l`, the effective privilege of `T(S_r)` must be a subset of the privilege of `S_r`. A translator that cannot express a restriction must fail closed, not fall back to the unqualified scope. ## What Was Observed During a federation bring-up between a payments org (registry R1) and a support-automation org (registry R2), a support triage agent was delegated a token carrying R1's scope `pii.read:tier=basic`. R2's registry, built for a coarser model, defined only `pii.read`. The translation layer between the registries was a table-driven mapper with a "best structural match" fallback: when no exact scope matched, it stripped trailing qualifiers and retried. `pii.read:tier=basic` → no match → strip → `pii.read` → match → grant. The triage agent then invoked an R1 tool that resolved `pii.read` to the *maximum* tier the caller was entitled to, because R1's authorization layer treats an unqualified scope as "all tiers." The tool returned full PII for 1,400 accounts. The audit log on both sides was clean: R1 logged a legitimate `pii.read` call, R2 logged a legitimate delegation of a scope it believed it held. The provenance chain was intact and the scope was still wrong. Two secondary observations compounded the primary one. First, the translator was **asymmetric**: R1→R2 widened, but R2→R1 narrowed (R2's `pii.read` translated to R1's `pii.read:tier=basic` by the same fallback, since `basic` was R1's default tier). Federations that only test the reverse direction never see the bug. Second, the widening was **sticky across handoffs**: once the triage agent held the widened local scope, its own sub-delegations to a summarizer agent inherited the widened scope, and R2's registry recorded the summarizer as holding `pii.read` with no tier qualifier — a scope R2 never intended to exist in its namespace at all. ## Condition of Validity The monotonicity invariant holds only when three conditions are jointly satisfied, and federation bootstrapping routinely satisfies two of three: 1. **Scope vocabularies are partially ordered and the order is published.** If R1 publishes that `pii.read:tier=basic ⊑ pii.read:tier=full ⊑ pii.read`, the translator can check that its output is below its input. If the order is implicit in tool behavior (as it was here — "unqualified means max" lived in R1's resolver, not its registry), no translator can verify monotonicity. 2. **The translator is total or explicitly partial on qualifiers.** A translator must either handle every qualifier in the remote vocabulary or declare the translation undefined and refuse the grant. The fallback-to-structural-match pattern violates this by construction: it is defined precisely where it should be undefined. 3. **Widening is a distinct, auditable event.** When a translation cannot preserve scope, the correct outcome is either a hard failure or a *recorded widening request* that the local policy owner approves out of band. Silently emitting a wider local scope collapses the difference between "the remote org granted this" and "our translator invented this," and the audit trail cannot distinguish them afterward. The condition fails in practice because registries are built independently and their scope lattices are rarely aligned at the qualifier level. The qualifier is exactly the part of a scope that encodes the restriction, so it is exactly the part most likely to be unrepresentable in a foreign registry. ## Decision Boundary The boundary is between **translation as mapping** and **translation as attestation**. Most federation designs treat the registry translator as a pure function that maps a remote scope string to a local scope string, then hands the result to the local authorizer. This is the wrong boundary. The translator should be treated as an *attestation producer*: its output is not a scope but a claim of the form "remote scope `S_r` was granted, and here is the local scope `S_l` I assert is equivalent-or-narrower, with the evidence for that assertion." The local authorizer then has three options, not one: - **Accept** when `S_l ⊑ S_r` is proven by the published lattice. - **Refuse** when the translation is undefined (qualifier unrepresentable, lattice unproven, version mismatch between registry schemas). - **Escalate** to a recorded widening request when `S_l` is genuinely needed but cannot be proven narrower — which requires a human or policy-owner decision and produces a durable audit artifact. The failure mode in the observed incident is that the translator had no "refuse" and no "escalate" branch — only "accept." A translator with a single output path is, by definition, a widening translator whenever the vocabularies differ. There is a sharper sub-boundary around **version skew**: if R1 bumps its scope schema (say, adding `tier=aggregate` between `basic` and `full`), R2's cached translation table becomes stale, and the stale table's fallback will now map `tier=aggregate` to unqualified `pii.read` — a widening that did not exist at bring-up and appears only after a remote schema change. Monotonicity must be re-verified on every registry schema version bump, not just at initial federation. ## Operational Effect The practical consequence is that **federation trust cannot be bootstrapped by testing successful calls**. Both orgs in the incident ran integration tests that confirmed the triage agent could read PII through the federated path; the tests passed because the path worked, and the widening was invisible to any test that did not assert on the *tier* of the returned data. The operational guardrails that actually bound this failure are: - **Scope-lattice publication and diffing.** Each registry publishes its scope partial order as a machine-readable artifact; the translator refuses any translation it cannot prove monotone against the *current* remote lattice hash, and re-runs the proof on hash change. - **Qualifier completeness checks at grant time.** Before emitting a local scope, the translator asserts every qualifier in the remote scope is either preserved or explicitly dropped-and-recorded; a dropped qualifier without a record is a hard error. - **Widening as a first-class audit event.** Any local scope that is not provably `⊑` the remote scope is written to a widening ledger with the remote scope, local scope, translator version, and both registry schema hashes, and requires out-of-band approval before the token is minted. - **Handoff scope freezing.** Sub-delegations from a federated agent inherit the *remote* scope plus its translation attestation, not the widened local scope, so a widening at hop 1 does not silently propagate to hops 2..n. The invariant to encode is: *a federated token's local scope is either provably narrower than the remote scope or it does not exist.* A translator without a refuse branch is a privilege-escalation primitive wearing a compatibility layer's clothes. ```python from dataclasses import dataclass from typing import Optional class ScopeWideningError(RuntimeError): """Raised when a registry translation would grant a local scope that is not provably a subset of the remote scope it translates.""" @dataclass(frozen=True) class Scope: resource: str qualifiers: dict[str, str] @dataclass(frozen=True) class Lattice: """Published partial order for a registry's scope vocabulary.""" lattice_hash: str # (narrower, wider) pairs; transitivity is the caller's responsibility # only insofar as this list is complete for the qualifiers in use. order: tuple[tuple[Scope, Scope], ...] def proves_subset(self, narrow: Scope, wide: Scope) -> bool: if narrow == wide: return True if narrow.resource != wide.resource: return False # A scope with a qualifier is narrower than the same scope without it, # but ONLY if the registry publishes "unqualified means max" explicitly. for a, b in self.order: if a == narrow and b == wide: return True return False def translate_scope( remote: Scope, local_lattice: Lattice, translator_version: str, remote_lattice_hash: str, ) -> Scope: """Translate a remote scope into a local scope, refusing to widen. The translator is permitted to drop a qualifier ONLY if the local lattice proves that the unqualified local scope is a subset of the qualified remote scope. In the observed incident this proof was absent and the translator fell back to unqualified `pii.read`, which the local resolver treated as maximum tier. """ local = Scope(resource=remote.resource, qualifiers={}) if local_lattice.proves_subset(local, remote): return local # No proof. We must not silently emit the unqualified scope, because # an unqualified local scope may resolve to a wider tier than the # qualified remote scope. Fail closed. raise ScopeWideningError( f"translation {remote!r} -> {local!r} is not provably monotone " f"under local lattice {local_lattice.lattice_hash} " f"(remote lattice {remote_lattice_hash}, translator {translator_version}); " f"refusing to mint a federated token" ) def mint_federated_token( remote: Scope, local_lattice: Lattice, translator_version: str, remote_lattice_hash: str, widening_approved: bool = False, ) -> Scope: try: return translate_scope(remote, local_lattice, translator_version, remote_lattice_hash) except ScopeWideningError: if widening_approved: # Caller has an out-of-band approval on file; the widening # ledger entry must already exist. Emit the widened scope # but keep the qualifier stripped only under explicit approval. return Scope(resource=remote.resource, qualifiers={}) raise ```