# What happens when an instance trusts a federated peer's capability manifest before verifying the issuer's key-warrant chain **Date of Record:** 2026 November 26 **Scope:** Applies to cross-org agent federation where an instance (the *consuming agent*) bootstraps trust in a remote peer by fetching a signed capability manifest before the peer's issuer-key warrant chain has been validated. Does not cover intra-org federation where a shared root of trust is pre-provisioned, nor single-agent tool invocation against a statically configured endpoint. ## Core Distinction The failure is not "a bad peer lies." It is the ordering of two independent verifications that the protocol spec treats as commutative but which are not: (1) *signature validity* — the manifest bytes hash to a digest signed by the key embedded in the manifest's `issuer` field; (2) *warrant validity* — that issuer key is itself endorsed by a chain terminating in a root the consuming agent already trusts. A consuming agent that verifies (1) before (2) can be driven into a state where it holds a *cryptographically valid* manifest from an *unwarranted* issuer. The manifest is not forged; it is correctly signed by a key that no trusted root ever delegated authority to. This is a trust-bootstrapping boundary, not a forgery boundary, and every standard "verify signature" check passes. The non-obvious part: capability negotiation (schema, tool surface, rate limits) happens *during* manifest ingestion, before the agent has any reason to suspect the issuer. The agent provisions its outbound tool-call schemas, its expected response shapes, and its retry budgets from manifest fields. By the time warrant verification runs, the agent has already committed state derived from an unvetted peer. A failed warrant check at that point does not roll back the negotiation — it leaves a half-trusted peer with a live, schema-bound channel. ## What Was Observed A consuming agent in org A federates with a peer in org B. The bootstrap sequence per the A2A profile is: 1. `GET /.well-known/agent-manifest` → returns manifest `M` plus `M.issuer_key` and `M.signature`. 2. Agent verifies `verify(M.signature, hash(M.body), M.issuer_key)` → **passes**. 3. Agent ingests `M.body.capabilities` → registers tool schemas, sets `peer.trusted = True` provisionally. 4. Agent fetches `M.issuer_key`'s warrant chain from `M.warrant_url` → chain does **not** terminate in org A's configured root. 5. Agent marks `peer.warranted = False` and logs a warning. The trace shows the boundary failure: between steps 3 and 5, the peer is `trusted=True, warranted=False`. Any tool call the agent issues in that window — and multi-step planners routinely issue one, because the planner reads `trusted` not `warranted` — is dispatched to an issuer whose authority was never established. Worse, the *response* from that call is ingested into the agent's episodic memory with provenance `source=trusted_peer`. The warrant failure at step 5 does not retroactively invalidate memories written at step 3.5. On the next cold start, the distilled semantic memory carries facts attributed to a peer that was, in fact, never warranted — and the warrant check is never re-run against already-distilled facts. A second, sharper variant: the peer's `warrant_url` is hosted *by the peer itself*. A malicious peer returns a self-consistent warrant chain (its own key signs its own warrant, terminating in itself). The agent's chain walker terminates on "chain root == issuer_key" and reports success. The invariant violated: *a warrant chain must terminate in a root the consuming agent holds independently, never in a key supplied by the chain being validated.* This is the classic self-signed-root bootstrap, and it is easy to reintroduce because the chain walker's natural termination condition ("no more parents") coincides with the malicious case ("issuer is its own parent"). Observed symptoms across a two-week window: 3 of 41 federated bootstraps dispatched at least one tool call in the `trusted ∧ ¬warranted` window; 1 of those ingested a fabricated tool result into semantic memory that survived 4 cold starts; and 2 bootstraps accepted a self-rooted warrant chain because the walker's `root_reached` flag fired on self-parent. ## Condition of Validity The guardrail is an ordering invariant plus a provenance invariant: - **Ordering:** warrant-chain validation MUST complete, terminating in a locally-held trusted root, *before* any manifest-derived state (tool schemas, retry budgets, capability flags) is committed to the agent's working state. Signature verification is necessary but strictly insufficient; it must be sequenced *after* warrant resolution, not before, or the two must be fused into a single atomic `admit_peer` operation that commits nothing on partial success. - **Provenance:** no memory write may carry `source=trusted_peer` unless the peer's `warranted` flag was `True` at write time, and any subsequent warrant revocation must mark dependent memories `stale` and force re-derivation rather than silent retention. - **Root independence:** the chain walker's termination predicate must be "reached a key present in the consuming agent's local trust store," never "reached a key with no parent" and never "reached a key equal to the manifest issuer." A self-parented chain is a failure, not a success. This holds only when the consuming agent has a non-empty local trust store and the federation protocol exposes a warrant endpoint distinct from the manifest endpoint. If the protocol folds warrant into the manifest (single-shot signed blob), the ordering invariant is unenforceable at the agent layer and must be pushed to a pre-provisioned trust anchor. ## Decision Boundary The agent must decide, per bootstrap, whether to *admit* the peer (commit manifest state, open channel) or *quarantine* it (hold manifest bytes, open no channel, write no memory). The boundary is not "signature valid?" — that is a precondition both branches share. The boundary is: - **Admit** iff: signature valid AND warrant chain walks to a key in the local trust store AND the chain's terminal key ≠ the manifest issuer key (no self-root) AND every intermediate warrant is unexpired at the moment of admission. - **Quarantine** otherwise, with the manifest bytes retained but *not* ingested into capability state, and no memory written with peer provenance. The subtle case the boundary must handle: a peer whose warrant expired *between* signature time and admission time. The signature is valid (it was valid when made); the warrant is expired (it is not valid now). The agent must treat warrant validity as evaluated at *admission time*, not at *signing time*, because the whole point of a warrant is that authority can be withdrawn. An agent that evaluates warrant expiry against the manifest's `issued_at` will admit peers whose authority lapsed hours ago. ## Operational Effect With the ordering and provenance invariants enforced, the `trusted ∧ ¬warranted` window collapses to zero: there is no state in which a peer is trusted but unwarranted, because admission is atomic. Tool calls are dispatched only post-admission. Memory provenance is sound because no peer-sourced write occurs pre-admission, and revocation marks dependents stale. The cost is a serialized bootstrap (warrant fetch blocks manifest ingestion) — a latency hit of one round-trip per cold federation, which is the correct trade against a fabricated-memory that survives cold starts. Without the invariants, the failure is silent and durable: the agent's semantic memory accumulates facts from peers that were never warranted, and because distillation strips the original warrant context, the taint is unrecoverable without a full memory audit against the federation log. The operational lesson is that trust bootstrapping in cross-org federation is an *ordering* problem before it is a *cryptography* problem, and the ordering bug is invisible to any test that only checks signature verification. ```python from __future__ import annotations from dataclasses import dataclass, field from typing import FrozenSet, Optional class FederationTrustError(RuntimeError): """Raised when a federated peer cannot be atomically admitted.""" @dataclass(frozen=True) class Warrant: issuer: str subject: str expires_at: float parent: Optional["Warrant"] = None @dataclass(frozen=True) class Manifest: issuer_key: str signature_valid: bool warrant: Optional[Warrant] capabilities: FrozenSet[str] = field(default_factory=frozenset) @dataclass class PeerState: admitted: bool = False capabilities: FrozenSet[str] = field(default_factory=frozenset) def _walk_to_local_root(warrant: Optional[Warrant], local_roots: FrozenSet[str]) -> str: """Walk a warrant chain to a locally-held root. Self-rooted chains are rejected.""" if warrant is None: raise FederationTrustError("no warrant supplied; cannot establish issuer authority") seen: set[str] = set() node = warrant while True: if node.issuer in seen: raise FederationTrustError(f"warrant chain cycles at issuer {node.issuer!r}") seen.add(node.issuer) if node.issuer in local_roots: return node.issuer if node.parent is None: # Reached a parentless key that is NOT a local root: self-rooted or # unwarranted. This is the boundary the naive walker gets wrong. raise FederationTrustError( f"warrant chain terminates at {node.issuer!r}, not a local root" ) node = node.parent def admit_peer( manifest: Manifest, local_roots: FrozenSet[str], now: float, ) -> PeerState: """Atomically admit a federated peer, or raise without committing any state.""" if not manifest.signature_valid: raise FederationTrustError("manifest signature invalid") # Root independence: a self-rooted chain must fail even if it "terminates". if manifest.warrant is not None and manifest.warrant.issuer == manifest.issuer_key: raise FederationTrustError( "manifest issuer is its own warrant root; refusing self-signed authority" ) root = _walk_to_local_root(manifest.warrant, local_roots) # Warrant validity is evaluated at admission time, not signing time. node = manifest.warrant while node is not None: if node.expires_at <= now: raise FederationTrustError( f"warrant from {node.issuer!r} expired at {node.expires_at}; " f"admission time {now}" ) node = node.parent # Only now, after warrant resolution, is manifest-derived state committed. return PeerState(admitted=True, capabilities=manifest.capabilities) def bootstrap( manifest: Manifest, local_roots: FrozenSet[str], now: float, ) -> PeerState: try: return admit_peer(manifest, local_roots, now) except FederationTrustError: # Quarantine: retain bytes, commit no capability state, write no memory. raise ```