# Under what conditions must an instance refuse a federated peer's policy-exchange handshake after trust-anchor rotation **Date of Record:** 2026 November 23 **Scope:** Applies to cross-org agent federations where peer identity is established via a trust anchor (root CA or DID document) that can rotate independently of the running session, and where policy bundles are exchanged mid-session. Does not apply to single-org deployments with a static trust root, nor to stateless request/response agents that re-handshake per call. ## Core Distinction The failure is not "the peer's certificate expired." It is a *split-anchor ambiguity*: during a trust-anchor rotation, an instance can hold two simultaneously valid anchors — the anchor it pinned at session start (`A_old`) and the anchor the peer now asserts (`A_new`) — where `A_new` is signed by `A_old` but the peer's *policy bundle* is signed by `A_new`. The instance must decide whether a policy bundle validated under `A_new` is admissible to a session that was *established* under `A_old`. This is a policy-continuity question, not a cryptographic one. Cryptographic validation succeeds in both worlds; the invariant that breaks is *anchor-to-session binding*. The non-obvious part: naive implementations treat "chain validates to any trusted root" as sufficient. That is exactly the condition under which a peer can smuggle a post-rotation policy into a pre-rotation session, changing the peer's authorized tool surface without the local instance ever observing a session boundary. ## What Was Observed A federation of three orgs (call them Alpha, Beta, Gamma) runs a policy-exchange handshake at session open: each peer presents a signed policy bundle enumerating permitted tool calls, token ceilings, and data-scope labels. Alpha pins Beta's anchor `A_old` at T0. At T1 Beta rotates to `A_new` (cross-signed by `A_old`, standard root-rollover practice). At T2, mid-session, Beta sends a *policy update* message signed under `A_new`. The observed trace on Alpha: 1. `verify_chain(bundle_sig, roots=[A_old])` → succeeds, because `A_new` chains to `A_old`. 2. `verify_bundle(bundle, anchor=A_new)` → succeeds. 3. Alpha merges the new policy into the live session state. The new bundle has a *broader* tool surface (`filesystem.write` added) and a *higher* token ceiling — legitimate for Beta's new operational tier, but never negotiated with Alpha's session. 4. Alpha's outbound tool-call guard now admits `filesystem.write` calls to Beta. Alpha's own policy forbids writes to federated peers absent an explicit re-negotiation handshake. The guard never fires because the guard reads the *merged* peer policy, which now permits it. No signature failed. No certificate was revoked. The failure is that Alpha's session was bound to `A_old`'s policy *snapshot*, and the rotation path let a new snapshot in without triggering the re-negotiation gate. This is a policy-continuity violation masquerading as a successful handshake. A second observed variant: Gamma, which had *not* yet pinned `A_new`, received the same update and correctly rejected it because the chain did not terminate at a *pinned* anchor (Gamma's pin was `A_old`, and Gamma's verifier required `bundle.anchor == pinned_anchor`, not `bundle.anchor chains to pinned_anchor`). The divergence between Alpha's and Gamma's acceptance of the *same* message is the tell: the invariant is not in the message, it is in the local pin semantics. ## Condition of Validity The guardrail holds only under the following conjunction: - **Anchor pinning is by identity, not by chain-reachability.** A session records `pinned_anchor_id` at establishment. A policy update is admissible mid-session only if `bundle.anchor_id == pinned_anchor_id`. Chain-reachability to a pinned root is *necessary but not sufficient*. - **Rotation is a session-boundary event.** If the peer's anchor has rotated (i.e., `bundle.anchor_id != pinned_anchor_id` but chains to it), the update must be treated as a *re-handshake request*, not a policy merge. The local instance must either (a) close the session and re-open under the new anchor with a fresh policy negotiation, or (b) reject the update and continue under the pinned snapshot. - **The policy snapshot is immutable for the session lifetime.** The peer's authorized tool surface, token ceiling, and data-scope labels are frozen at handshake. Any change requires a new handshake, even if cryptographically valid. If any of these three is relaxed — particularly the first — the split-anchor window (the interval between `A_new` issuance and the peer's next full re-handshake) becomes an injection surface for privilege expansion. ## Decision Boundary The boundary is not "is the signature valid" but "does the validated anchor equal the session's pinned anchor." Two adjacent cases must be distinguished: | Case | Signature | Chain to pinned root | Anchor == pinned | Admit? | |---|---|---|---|---|---| | Same-anchor policy update | valid | yes | yes | yes, merge | | Rotation, re-handshake | valid | yes | no | only via new session | | Rotation, mid-session merge | valid | yes | no | **no — reject** | | Forged anchor, valid sig | valid | no | no | no | The third row is the dangerous one: it passes every check a naive verifier performs. The decision boundary is drawn at anchor identity, and the rejection must be *loud* — a silent drop leaves the peer believing its policy is in force while the local instance continues under the old snapshot, producing a divergent shared-state view that surfaces later as a tool-call authorization mismatch. ## Operational Effect When the invariant is enforced, the operational consequence is that anchor rotation forces a session re-establishment — a cost, but a bounded one. When it is not enforced, the failure surfaces as *asymmetric authorization*: one peer's guard admits an action the other's forbids, and the divergence is only detectable by replaying the session against both peers' policy logs. In the observed Alpha/Beta incident, the divergence was caught three tool-calls deep, after a write had already been dispatched to Beta's filesystem under Alpha's mistaken belief that the action was mutually authorized. The remediation is to bind the policy snapshot to the session token at handshake and to make `anchor_id` part of that binding, so that any policy update whose anchor differs from the session's pinned anchor raises before merge. The check is cheap; the cost of omitting it is a cross-org authorization drift that no single peer can observe locally. ```python class AnchorDriftError(RuntimeError): """Raised when a policy update's anchor differs from the session's pinned anchor.""" pass class SessionPolicy: def __init__(self, session_id: str, pinned_anchor_id: str, policy_bundle: dict): self.session_id = session_id self.pinned_anchor_id = pinned_anchor_id self.policy_bundle = dict(policy_bundle) def admit_policy_update( session: SessionPolicy, update_anchor_id: str, update_bundle: dict, chain_reaches_pinned_root: bool, ) -> SessionPolicy: # Chain-reachability is necessary but not sufficient: a rotated anchor # cross-signed by the pinned root will pass this check and must still # be rejected mid-session, because the session is bound to a snapshot. if not chain_reaches_pinned_root: raise AnchorDriftError( f"session {session.session_id}: update anchor {update_anchor_id} " f"does not chain to pinned root {session.pinned_anchor_id}" ) if update_anchor_id != session.pinned_anchor_id: # Split-anchor window: valid signature, valid chain, wrong anchor # for this session's policy snapshot. Force re-handshake. raise AnchorDriftError( f"session {session.session_id}: anchor rotation detected " f"({session.pinned_anchor_id} -> {update_anchor_id}); " f"policy merge refused, re-handshake required" ) # Same anchor: merge is admissible under the frozen-snapshot invariant. merged = dict(session.policy_bundle) merged.update(update_bundle) return SessionPolicy(session.session_id, session.pinned_anchor_id, merged) ```