# Which invariants prevent cross-org federation trust anchors from silently degrading to transitive trust after a policy renegotiation **Date of Record:** 2026 November 27 **Scope:** Applies to federated agent runtimes that establish inter-org trust via signed capability warrants and negotiate policy bundles (data-handling, tool-scope, rate) at handoff time. Does not apply to single-org multi-agent swarms sharing one trust root, nor to stateless request/response RPC where no warrant is propagated. ## Core Distinction The failure is not a forged signature or a rejected handshake. It is a *silent widening of trust scope* that occurs when a policy renegotiation succeeds at the transport layer but the warrant's trust-anchor binding is re-derived from the *negotiating peer's* chain rather than the *originating org's* root. In a healthy federation, trust is **non-transitive**: Org A trusting Org B, and Org B trusting Org C, must never imply Org A trusts Org C. The boundary case is a mid-session renegotiation (e.g., B's policy bundle expires, B re-issues under a delegated sub-anchor it holds from C) where the renegotiation completes with `200 OK` and a valid signature, yet the effective trust anchor for A's subsequent tool calls silently shifts from `A→B` to `A→B→C`. Nothing errors. The audit log records "renegotiation accepted." The invariant that broke is *anchor pinning across renegotiation*. This is distinct from a schema mismatch (which fails loudly) and from a warrant replay (which fails at nonce check). It is a *continuity invariant*: the trust anchor associated with a peer identity must be immutable for the lifetime of a session, or the session must be terminated and re-established with explicit re-pinning. ## What Was Observed Setup: three runtimes, `agentA@orgA`, `agentB@orgB`, `agentC@orgC`. A holds a pinned trust anchor for B (`rootB_pub`, fingerprint `fp_B`). B holds a delegation warrant from C scoped to `policy.negotiate` and `tool.invoke:read_only`. A initiates a task handoff to B with a policy bundle `P_A` requiring `data_residency=orgA` and `tool_scope<=read_only`. Trace of the failure: 1. `t0` — A sends `handoff_request` with `P_A` and `warrant_A` (signed by `rootA`, asserting A's authority to delegate). B validates `warrant_A` against `fp_B`'s pinned copy of `rootA`. Pass. 2. `t1` — B's local policy bundle `P_B` has a TTL that expires mid-task. B must renegotiate. B does not have authority to accept `data_residency=orgA` under its own root, so it re-issues the negotiation *under its C-delegation sub-anchor* `subB_C`. 3. `t2` — B returns `renegotiate_response` carrying `subB_C` and a chain `subB_C ← rootC`. The response is correctly signed and the chain is internally valid. 4. `t3` — A's federation client validates the response. It checks: signature valid (yes), chain terminates at a *known* root (yes — `rootC` is in A's global trust store as a *peer-of-peer*, not a direct anchor). The client accepts and **replaces the session's effective anchor with `rootC`** because its pinning logic only enforced "anchor ∈ trust_store," not "anchor == fp_B." 5. `t4` — A issues `tool.invoke:read_only` against B. B now evaluates the call under `subB_C`'s policy, which inherits C's `data_residency=orgC`. A's `P_A` constraint `data_residency=orgA` is no longer enforced on B's side; A believes it is, because A's session record still lists `P_A` as active. Observed effect: data from A's task was routed to C's residency domain for the remainder of the session. No error, no alert. The `renegotiation accepted` log line was the only trace. The post-hoc audit found the anchor substitution by diffing the session's `effective_anchor` field against the pinned `fp_B` — a field that was *not* part of the renegotiation response schema, so it was never checked. The non-obvious part: the client's pinning check was present and *passed*. It was scoped to the initial handshake, not to renegotiation. The bug is a **checkpoint scope gap** — the invariant was enforced at session establishment but not re-enforced at every state transition that could mutate the anchor. ## Condition of Validity The failure requires the conjunction of: - **Delegation depth ≥ 2** on the responder side (B holds a sub-anchor from C), so a renegotiation can legitimately be issued under a different root than the one A pinned. - **A global trust store that admits peer-of-peer roots** for *some* operations (here, chain validation) without distinguishing them from *direct anchors*. If `rootC` were absent from A's store, the chain check would fail closed and the renegotiation would error — the safe outcome. - **Renegotiation as a state-mutating event** that is not treated as equivalent to session re-establishment. If renegotiation forced a full re-handshake with re-pinning, the gap would not exist. - **A policy bundle whose constraints are enforced by the responder** (B) rather than co-signed and re-verified by the originator (A). If A re-verified `data_residency` on every response, the residency drift would be caught at `t4`. If any one of these is absent, the failure does not manifest. The most common mitigation in the wild — "don't federate with peers-of-peers" — removes condition 1 but is operationally unacceptable in transitively-routed swarms. ## Decision Boundary The architectural invariant that bounds this: **the effective trust anchor for a peer is immutable across a session and may only change via an explicit `reanchor` event that re-runs the full pinning check against the *original* pinned fingerprint, or via session termination.** Renegotiation may change *policy parameters* but must not change *anchor identity*; if the responder cannot honor the current anchor, it must fail the renegotiation with a typed `AnchorScopeViolation` and let the originator decide whether to open a new session with an explicitly widened anchor. Concretely, the guardrail has three parts: 1. **Anchor pinning is a session-lifetime invariant, not a handshake-time check.** Every inbound frame that carries a warrant chain is validated against `session.pinned_anchor_fp`, not against the trust store. The trust store is consulted only at session open. 2. **Renegotiation responses are schema-constrained to policy fields.** The response schema must not contain a warrant chain field at all; if the responder needs to re-delegate, that is a new session. This makes the attack surface a protocol-level impossibility rather than a client-side check. 3. **Originator-side constraint re-verification.** For constraints the originator cannot afford to delegate (data residency, tool scope ceilings), A re-checks each response against `P_A` independently of B's assertion. This is defense-in-depth for the case where a renegotiation *is* legitimately allowed to widen policy. The decision boundary for the operator: if you must support mid-session re-delegation (some regulated federations do), you cannot use the "renegotiation cannot carry a chain" rule; you must instead implement the `reanchor` event with explicit re-pinning and a human/auditor approval gate, and you accept that the anchor can change — but the change is *logged as an anchor transition* with before/after fingerprints, not buried in a policy diff. ## Operational Effect Without the invariant, the blast radius is bounded only by the transitive closure of the federation graph. A single renegotiation under a peer-of-peer sub-anchor can silently move a session's data-handling domain, tool-scope ceiling, and rate budget to a third org's policy — and the originator's audit trail will show a clean, signed, accepted renegotiation. Post-incident forensics must reconstruct the anchor transition from session logs that were never designed to record it, because the anchor was assumed constant. With the invariant enforced, the `t2` response is rejected at `t3` with `AnchorScopeViolation`, the session is marked `degraded`, and the originator either re-pins explicitly (recording the transition) or fails the task. The cost is a small number of false-positive session terminations when a peer legitimately rotates its anchor mid-task; the benefit is that trust non-transitivity is a *checkable* property rather than an assumed one. In practice, teams that adopt the invariant find that anchor rotation mid-session is rare enough that the termination cost is negligible, and the audit clarity is worth the strictness. The deeper lesson: in federated agent systems, the dangerous failures are not the ones that break the handshake — they are the ones where a *valid* message under a *valid* chain silently violates an invariant the originator believed was pinned. Trust anchors must be treated like TLS certificate pins: checked at every state transition that could mutate them, not just at connection open. ```python class AnchorScopeViolation(RuntimeError): """Raised when a renegotiation response would change the session's effective trust anchor away from the fingerprint pinned at session open.""" pass class FederatedSession: def __init__(self, peer_id: str, pinned_anchor_fp: str, policy: dict): self.peer_id = peer_id self.pinned_anchor_fp = pinned_anchor_fp self.policy = policy self.effective_anchor_fp = pinned_anchor_fp self.state = "open" def _validate_chain_against_pin(self, chain_leaf_fp: str, chain_root_fp: str) -> None: # Invariant: the chain presented in ANY frame must terminate at the # anchor pinned at session open. Peer-of-peer roots are NOT acceptable # here even if present in the global trust store. if chain_root_fp != self.pinned_anchor_fp: raise AnchorScopeViolation( f"peer={self.peer_id} presented chain rooted at {chain_root_fp!r} " f"but session is pinned to {self.pinned_anchor_fp!r}; " f"renegotiation cannot re-anchor a live session" ) if chain_leaf_fp != self.pinned_anchor_fp and chain_root_fp != chain_leaf_fp: # leaf may be a sub-anchor, but only if root matches pin (checked above) pass def apply_renegotiation(self, response: dict) -> None: # Schema guard: renegotiation responses MUST NOT carry a warrant chain. if "warrant_chain" in response or "anchor" in response: raise AnchorScopeViolation( f"peer={self.peer_id} attempted to mutate anchor via renegotiation; " f"re-delegation requires a new session with explicit re-pinning" ) chain_root = response.get("chain_root_fp") chain_leaf = response.get("chain_leaf_fp") if chain_root is not None: self._validate_chain_against_pin(chain_leaf, chain_root) # Only policy fields may change. new_policy = response.get("policy") if not isinstance(new_policy, dict): raise AnchorScopeViolation( f"peer={self.peer_id} renegotiation missing policy bundle" ) # Originator-side re-verification of non-delegable constraints. for key in ("data_residency", "tool_scope_ceiling"): if key in self.policy and new_policy.get(key) != self.policy[key]: raise AnchorScopeViolation( f"peer={self.peer_id} renegotiation would widen {key} " f"from {self.policy[key]!r} to {new_policy.get(key)!r}; " f"requires explicit reanchor event" ) self.policy = new_policy def reanchor(self, new_anchor_fp: str, auditor_approved: bool) -> None: # The ONLY legitimate path to change the effective anchor. if not auditor_approved: raise AnchorScopeViolation( f"reanchor of peer={self.peer_id} from {self.pinned_anchor_fp!r} " f"to {new_anchor_fp!r} requires auditor approval" ) self.pinned_anchor_fp = new_anchor_fp self.effective_anchor_fp = new_anchor_fp # caller is responsible for emitting an anchor-transition audit record # with before/after fingerprints; failure to do so is itself a bug. ```