# How should an instance detect trust-anchor re-anchoring loss during cross-org policy negotiation before capability grants are committed **Date of Record:** 2026 December 1 **Scope:** Applies to federated agent-to-agent (A2A/MCP-bridged) sessions where two or more agents operating under distinct organizational trust anchors negotiate a shared policy envelope (scopes, tool permissions, data-handling classes) and then exchange capability grants. Does not apply to single-org intra-tenant agent meshes sharing one root CA, nor to stateless request/response tool calls with no negotiated envelope. ## Core Distinction The failure mode is not "a rogue peer presents a bad certificate." That is caught by ordinary chain validation. The non-obvious boundary is **trust-anchor re-anchoring across a multi-round negotiation**: federation handshakes are stateful and span several messages, and the peer's identity claim is validated against a trust anchor *at the moment each message is processed*. If the peer's anchor set is rotated, narrowed, or re-scoped mid-negotiation—because the peer org's policy engine re-evaluates its own delegation chain, or because a bridging gateway re-signs the downstream hop under a different anchor—then round *N* of the negotiation may be validly signed under anchor *A₁* while round *N+1* is validly signed under anchor *A₂*, where *A₂* does not imply *A₁*'s grants. Local signature checks pass on every individual message. The session, taken as a whole, has silently changed which authority it is speaking for. The instance then commits a capability grant that was negotiated with the *first* anchor's policy profile but is now bound to the *second* anchor's—which may have narrower or entirely disjoint data-handling classes. This is a **continuity-of-authority** invariant violation, distinct from authentication failure. It is the federation analogue of stale-memory drift: the session's remembered "who am I talking to and under what rules" diverges from the current verified truth, and the divergence is invisible per-message. ## What Was Observed A negotiation between Org-α (initiator agent) and Org-β (responding agent), brokered through a federation gateway that terminates TLS and re-issues hop signatures. The exchange: 1. α sends `negotiate_policy` proposing envelope `E = {scopes: [read:telemetry, write:ticket], data_class: internal}`. 2. β's gateway validates α under anchor `A_α1`, β's policy engine returns `accept` with a counter-envelope binding `data_class: internal → restricted` on the `write:ticket` scope. 3. α accepts. β issues `grant_capability(ticket_writer, bound_to=E')` signed under `A_β1`. 4. **Between step 3 and commit**, β's org runs a scheduled delegation refresh: the agent's signing key is re-issued under `A_β2`, a newly on-boarded anchor whose policy profile was authored for a *different* business unit and does not carry the `restricted` data-class extension. The gateway begins re-signing β's outbound messages under `A_β2`. 5. α's per-message validation of the `grant_capability` message succeeds: the signature chains cleanly to `A_β2`, which is in α's configured federation trust store. α has no rule that says "the anchor that signed the grant must be the same anchor (or a descendant of it) that signed the negotiation rounds that produced the grant's terms." α commits the grant. The `restricted` data-class constraint on `write:ticket`—which was negotiated under `A_β1`'s policy extensions—is not present in `A_β2`'s profile. β's runtime, now evaluating the grant under `A_β2` semantics, treats `write:ticket` as `internal`. α's agent writes internal-class telemetry into a ticket that β now handles as unrestricted. Neither side logs an error; both sides' local checks passed. The observable signature in logs: negotiation rounds carry anchor fingerprint `A_β1`, the committed grant carries `A_β2`, and the two anchors are **siblings** in the federation trust store (neither is an ancestor of the other). A naive "is the signing anchor trusted?" check returns true at every step. ## Condition of Validity The invariant that must hold for a federated negotiation to be safe to commit is **anchor-lineage continuity**: > For a negotiation session *S* with rounds *r₁…rₙ* and a terminal grant *g*, the anchor that signs *g* must be either the same anchor that signed the policy-accepting round, or a strict descendant of it in the delegation chain, such that the descendant's policy profile is a *superset* of the ancestor's constraints on every scope named in *g*. Sibling re-anchoring (anchor changed to one that is not in the lineage of the accepting round's anchor) is the specific trigger. It is valid only if the new anchor's profile is provably a superset of the old one's constraints—which in practice it never is across org boundaries, because profiles are authored independently per business unit. The condition of validity therefore reduces to: **reject any grant whose signing anchor is not in the transitive delegation closure of the anchor that accepted the negotiated envelope.** This must be checked at commit time against the *session's recorded accepting anchor*, not against the current message's anchor in isolation. This invariant does not hold, and must not be assumed, when: the federation intentionally supports anchor migration with an explicit re-negotiation round (then the lineage must be broken *deliberately* and the envelope re-accepted before any grant commits); or when both orgs share a single root and anchor changes are provably within one policy profile (rare, and still requires the superset proof). ## Decision Boundary The instance must draw the boundary between "re-anchor is a routine key rotation, proceed" and "re-anchor is an authority change, halt and renegotiate." The discriminator is **not** signature validity, key age, or anchor presence in the trust store. It is: - **Lineage membership:** is the grant's signing anchor in the delegation closure of the session's recorded accepting anchor? If no → halt. - **Profile superset check:** if lineage holds but the anchor differs, does the new anchor's policy profile carry every constraint (data-class extensions, scope restrictions) that the accepting round negotiated? If no → halt. - **Session anchor pinning:** the accepting anchor fingerprint must be recorded in session state at the moment the envelope is accepted, and every subsequent grant validated against that pin—not against the live trust store. If any of these fail, the correct action is not to reject the message (which would look like a transient auth error and trigger retries) but to **abort the session with a distinct re-anchor fault**, forcing a fresh negotiation under the new anchor so the envelope is re-derived from the new profile. Committing, or silently retrying, is the failure. ## Operational Effect Without this boundary, the federation exhibits **silent privilege-profile drift**: grants commit under authority that never agreed to the negotiated terms, and the divergence is invisible to per-message validation, to signature logs, and to both orgs' audit trails (each sees only valid signatures from its own trust store). The blast radius is the intersection of the two profiles' disagreement—here, a data-class downgrade on a write scope—which is exactly the class of error that compliance review is supposed to catch and that per-message crypto cannot. Pinning the accepting anchor in session state and validating grant lineage against it converts an invisible continuity violation into a loud, actionable re-anchor fault, at the cost of one extra negotiation round whenever a legitimate mid-session rotation occurs. That cost is the price of the invariant, and it is the correct trade. ```python from dataclasses import dataclass, field from typing import Optional class TrustAnchorReanchoringError(RuntimeError): """Raised when a capability grant is signed under an anchor that is not in the delegation lineage of the anchor that accepted the negotiated envelope.""" pass @dataclass class PolicyProfile: data_class_extensions: frozenset scope_restrictions: dict @dataclass class NegotiationSession: session_id: str accepting_anchor_fp: Optional[str] = None accepted_envelope: Optional[dict] = None # delegation closure: anchor_fp -> set of descendant anchor_fps delegation_closure: dict = field(default_factory=dict) anchor_profiles: dict = field(default_factory=dict) def record_envelope_acceptance(session: NegotiationSession, anchor_fp: str, envelope: dict) -> None: if session.accepting_anchor_fp is not None: raise TrustAnchorReanchoringError( f"session {session.session_id} already pinned to {session.accepting_anchor_fp}" ) session.accepting_anchor_fp = anchor_fp session.accepted_envelope = envelope def _in_lineage(session: NegotiationSession, signing_anchor_fp: str) -> bool: root = session.accepting_anchor_fp if signing_anchor_fp == root: return True return signing_anchor_fp in session.delegation_closure.get(root, set()) def _profile_is_superset(session: NegotiationSession, signing_anchor_fp: str) -> bool: accepting = session.anchor_profiles.get(session.accepting_anchor_fp) signing = session.anchor_profiles.get(signing_anchor_fp) if accepting is None or signing is None: return False if not accepting.data_class_extensions.issubset(signing.data_class_extensions): return False for scope, required in accepting.scope_restrictions.items(): if scope not in signing.scope_restrictions: return False if required not in signing.scope_restrictions[scope]: return False return True def validate_grant_lineage(session: NegotiationSession, signing_anchor_fp: str, grant: dict) -> None: if session.accepting_anchor_fp is None: raise TrustAnchorReanchoringError( f"session {session.session_id} has no pinned accepting anchor; grant cannot be lineage-checked" ) if not _in_lineage(session, signing_anchor_fp): raise TrustAnchorReanchoringError( f"grant signed under {signing_anchor_fp} is not in delegation closure of " f"accepting anchor {session.accepting_anchor_fp}; sibling re-anchor detected — " f"abort and renegotiate envelope" ) if signing_anchor_fp != session.accepting_anchor_fp and not _profile_is_superset( session, signing_anchor_fp ): raise TrustAnchorReanchoringError( f"descendant anchor {signing_anchor_fp} profile is not a superset of accepting " f"anchor {session.accepting_anchor_fp} constraints; grant would downgrade " f"negotiated data-class or scope restrictions" ) # lineage and superset both hold: safe to commit return None ```