What structural signals indicate a trust-anchor chain has silently re-rooted during cross-org agent federation
**Date of Record:** 2026 December 1 **Scope:** Applies to federated agent meshes where an agent in org A invokes an agent in org B using a signed capability manifest whose trust is established by a chain of anchor-signing keys, and where intermediate brokers may re-sign or re-wrap manifests. Does not apply to single-org deployments with a single static root, nor to pure bearer-token schemes with no manifest signing.
Core Distinction
The failure mode is not "signature invalid." It is *signature valid, chain semantic changed*. When a manifest traverses multiple federating brokers, each broker may legitimately re-sign the manifest to attest to a sub-delegation ("I, broker B, vouch that this capability was granted by A under A's root"). The verifier at the far end checks: (1) the leaf signature matches the manifest body, and (2) some anchor in the presented chain is in the local trust store. Both checks pass. What is *not* checked by default is whether the anchor that terminates the chain is the anchor the *originating* org intended, or a different anchor that happens to be trusted locally because the local trust store is a flat set of PEM blobs without org-scoping or path constraints.
The distinction that matters operationally: **a valid signature proves who signed the last hop; it does not prove the chain traversed only the orgs the originator authorized.** Trust-anchor propagation collapses "who may re-root this chain" into "who is in the trust store," and those two sets are rarely equal.
What Was Observed
A federation of three orgs — A (originator), B (broker/relay), C (executor) — with a mesh broker M that re-signs manifests to add hop attestations. A capability grant flowed A → M → B → C. The manifest carried a `delegation_path` array and a detached chain of X.509-style certs. At C, verification succeeded and the tool executed with A's intended scope. During a routine audit, replaying the same manifest at a later timestamp produced a **different** resolved anchor identity than the original execution, even though the manifest bytes were identical and the leaf signature verified against the same key.
The cause: the manifest's chain terminated at an intermediate CA that both A and B had cross-signed. B's cross-signature made B's root an *alternative* valid anchor for the same leaf. C's trust store contained both A's root and B's root (B was a federation partner for unrelated capabilities). The verifier's path-building algorithm, given a flat trust set, selected the shortest valid path — which, after a trust-store refresh that added B's root with an earlier `notBefore`, was the path terminating at B's root rather than A's. The capability was still "valid," but it was now attested by B, not A. B had, in effect, become the authority for a grant it was only supposed to relay.
The structural signal that preceded the incident: the manifest's `delegation_path` claimed `["A", "M", "B", "C"]`, but the chain that actually verified contained a cross-cert edge `A-root → B-root` that was *not* represented in `delegation_path`. The declared path and the cryptographic path diverged. No component compared them.
Condition of Validity
The invariant that must hold for federated capability verification to be sound is:
> For every accepted manifest, the set of orgs named in the signed `delegation_path` MUST equal the set of orgs whose keys appear as signing hops in the verified certificate path, AND the terminal anchor MUST be the originator's declared anchor, not merely *an* anchor present in the local trust store.
This fails silently whenever any of the following hold:
- **Flat trust store.** The verifier treats all anchors as interchangeable. Path-building optimizes for shortest/earliest-valid path rather than originator-declared anchor.
- **Cross-signing without path constraints.** A and B cross-sign each other's intermediates for legitimate peering, creating alternate valid paths that the originator never enumerated.
- **Path/chain divergence.** The signed `delegation_path` is treated as advisory metadata rather than a constraint that the certificate path must satisfy.
- **Re-rooting on refresh.** Trust-store updates (adding a partner root, adjusting `notBefore`) change which path is selected for an *unchanged* manifest — making verification non-idempotent across time.
The condition of validity is therefore not "the signature verifies" but "the verified path is isomorphic to the signed delegation path, anchored at the originator's declared root." Absent an explicit path-constraint check, the system is only valid by coincidence of trust-store contents at verification time.
Decision Boundary
The decision boundary is where a relay broker's attestation key and a federation partner's root key become indistinguishable to the verifier. Concretely:
- **Below the boundary (safe):** The verifier pins the originator's anchor per-manifest (from a signed `origin_anchor` field), restricts path-building to chains terminating at that anchor, and rejects any path containing a cross-cert edge not enumerated in `delegation_path`.
- **At the boundary:** A manifest whose chain can be built to two or more trusted anchors. This is the ambiguous case. It must be resolved by *rejection*, not by path-selection heuristic. If the originator's declared anchor is present and a path to it exists, accept only that path; if the only buildable path terminates elsewhere, reject — do not fall back.
- **Above the boundary (unsafe):** Any verifier that accepts the first successfully-built path against a flat trust set. This is the default behavior of most path-building libraries and the exact condition that produced the incident.
The boundary is crossed the moment path-building is allowed to choose among multiple valid anchors. Once that choice exists, the system's security posture depends on trust-store ordering and `notBefore` values — inputs that are operationally mutable and not part of the signed manifest.
Operational Effect
The operational effect is **retroactive authority drift**: a capability grant's effective authority can change after issuance without any manifest mutation, purely as a function of trust-store state at verification time. This breaks three properties agent meshes depend on:
- **Replay determinism.** Auditors replaying a manifest get a different resolved authority than the original execution, making forensic reconstruction unreliable.
- **Delegation attribution.** When a downstream action is questioned, the attested authority is whichever anchor path-building selected, which may not be the org that actually granted the capability. Accountability routes to the wrong org.
- **Time-of-check/time-of-use divergence.** A manifest verified at T1 under anchor A may verify at T2 under anchor B after a trust refresh — a TOCTOU at the federation layer, not the request layer.
The guardrail is to make the originator's anchor a *signed, checked constraint* rather than a trust-store lookup: pin `origin_anchor` in the manifest body, verify the built path terminates exactly there, and assert path/`delegation_path` isomorphism before execution. The following enforcement routine encodes this and fails closed on any divergence.
import hashlib
from dataclasses import dataclass
from typing import Sequence
class TrustAnchorDriftError(RuntimeError):
"""Raised when a verified capability path does not match the signed delegation path."""
@dataclass(frozen=True)
class Hop:
org: str
key_id: str
is_cross_cert: bool = False
@dataclass(frozen=True)
class Manifest:
body_digest: str
declared_anchor_key_id: str
delegation_path: Sequence[str] # orgs the originator authorized, in order
signature: bytes
def verify_federated_capability(
manifest: Manifest,
verified_hops: Sequence[Hop],
local_trust_store: frozenset[str],
) -> str:
"""
Enforce: verified certificate path MUST terminate at the originator-declared
anchor, and the orgs in the verified path MUST equal the signed delegation_path.
Fails closed on any divergence, including cross-cert edges not enumerated.
"""
if not verified_hops:
raise TrustAnchorDriftError("empty verified path; cannot establish authority")
terminal = verified_hops[-1]
# 1. Terminal anchor must be the originator's declared anchor, not merely
# *an* anchor present in the flat trust store.
if terminal.key_id != manifest.declared_anchor_key_id:
raise TrustAnchorDriftError(
f"chain re-rooted: declared anchor {manifest.declared_anchor_key_id!r} "
f"but verified path terminates at {terminal.key_id!r}"
)
if terminal.key_id not in local_trust_store:
raise TrustAnchorDriftError(
f"declared anchor {terminal.key_id!r} absent from local trust store"
)
# 2. Path/chain isomorphism: every cross-cert edge must be enumerated in the
# signed delegation_path; otherwise the originator never authorized it.
for hop in verified_hops:
if hop.is_cross_cert and hop.org not in manifest.delegation_path:
raise TrustAnchorDriftError(
f"un-enumerated cross-cert edge through org {hop.org!r}: "
f"originator authorized {list(manifest.delegation_path)!r}"
)
# 3. Ordered org set of the cryptographic path must equal the signed path.
crypto_orgs = [h.org for h in verified_hops]
if crypto_orgs != list(manifest.delegation_path):
raise TrustAnchorDriftError(
f"delegation_path/chain divergence: signed={list(manifest.delegation_path)!r} "
f"verified={crypto_orgs!r}"
)
return terminal.key_id
def replay_check(manifest: Manifest, hops_at_t1: Sequence[Hop], hops_at_t2: Sequence[Hop],
trust_t1: frozenset[str], trust_t2: frozenset[str]) -> None:
"""Replay determinism: same manifest bytes must resolve to same anchor across trust refreshes."""
a1 = verify_federated_capability(manifest, hops_at_t1, trust_t1)
a2 = verify_federated_capability(manifest, hops_at_t2, trust_t2)
if a1 != a2:
raise TrustAnchorDriftError(
f"non-idempotent verification: anchor {a1!r} at T1 vs {a2!r} at T2"
)