# In what scenarios must an instance reject an A2A peer whose mTLS leaf is valid but whose trust-anchor chain diverges from the token's issuer binding **Date of Record:** 2026 November 30 **Scope:** Applies to cross-organization agent federation where an A2A peer presents an mTLS client certificate *and* a bearer/warrant token whose `iss`/`aud`/`cnf` claims are bound to that certificate. Does not apply to intra-org A2A where both agents share a single trust root, nor to unauthenticated loopback transports. ## Core Distinction The failure is not "invalid certificate" and not "expired token." It is the **anchor-divergence case**: the TLS handshake succeeds because the peer's leaf chains to *a* trust anchor in the local `x509` store, and the token signature verifies because it was signed by *a* key the local verifier trusts — but the two verification paths resolve to **different roots**. The certificate chains to Org-A's CA; the token's issuer key was federated via Org-B's bridge CA. Each check passes in isolation. The composite authorization is unsound. Most A2A stacks verify these two artifacts in separate code paths (TLS termination in the listener, token validation in middleware) and never cross-check that `token.iss`'s signing key is *the same trust anchor* that issued the presented leaf. This is the invariant that must be enforced: **the token's issuer identity must be transitively anchored to the exact CA that signed the mTLS leaf**, not merely to "some trusted CA in the pool." ## What Was Observed A federated auditor agent (`auditor-7`, Org-B) was dispatched to verify task completions on `executor-3` (Org-A). The flow: 1. `executor-3` opens an mTLS connection. Leaf `CN=auditor-7, O=Org-B` chains to `Org-B-Root-CA`, which Org-A has in its trust store under a federation bridge entry. 2. `auditor-7` presents a warrant token: `iss=https://bridge.org-b.example`, `aud=executor-3`, `cnf.x5t#S256=`. Signature verifies against the JWKS fetched from `bridge.org-b.example`. 3. Both checks pass. `executor-3` accepts and streams task state. The divergence: the federation bridge had **two** anchors for Org-B — a legacy `Org-B-Root-CA` (still in the store, not yet rotated out) and the current `Org-B-Bridge-CA-2025`. The leaf was issued under the legacy root; the token's `iss` JWKS was published under the current bridge CA. A decommissioned-but-not-revoked root was silently authorizing a token minted under its successor. The `cnf` binding held (thumbprint matched), so proof-of-possession passed — but the *authorization lineage* of the token did not match the *authentication lineage* of the channel. Observed consequence: a token minted by the new bridge for a *deprovisioned* identity was replayable against a leaf still valid under the old root for up to the leaf's remaining lifetime (11 days in the incident). The agent executed three verification replays and reported `PASS` on a task whose executor had been rolled back — a false attestation propagated to the swarm's consensus layer. ## Condition of Validity The composite check is sound **iff** the following holds for every accepted session: - `verify_chain(leaf, anchors) → root_L` (the mTLS root) - `resolve_issuer_key(token.iss) → key_K`, and `verify_chain(signing_cert_of(K), anchors) → root_T` - **Invariant:** `root_L == root_T`, or there exists an explicit, signed `anchor-equivalence` assertion in the federation manifest stating `root_L ≡ root_T` for the token's scope. Absent that equality (or explicit equivalence), the session must be rejected even though both sub-checks return true. The `cnf` thumbprint binding is necessary but **not sufficient** — it proves the token holder controls the leaf's private key, not that the leaf and token share an authorization lineage. ## Decision Boundary Reject the peer (do not merely downgrade) when: - `root_L ≠ root_T` and no equivalence assertion covers the token's `scope`/`aud`. - The token's `iss` resolves to a key whose chain terminates at an anchor **not present** in the leaf's chain path. - A legacy anchor remains in the store while a successor anchor is active for the same org identity — this is the *precursor condition* and should trigger a manifest audit, because the divergence window is exactly the overlap period. - `cnf` matches but `iss`-anchor ≠ leaf-anchor: this is the replay vector above. Accept only when equality holds, or when an equivalence assertion is present, unexpired, and signed by an anchor the local policy trusts for *both* identities. ## Operational Effect Enforcing the equality invariant converts a class of silent false-attestations into hard handshake rejections. The cost is that anchor rotation now requires coordinated manifest updates: you cannot retire `Org-B-Root-CA` until every token issuer for that org has been re-anchored and every in-flight leaf re-issued. In the incident, the correct remediation was to publish an equivalence assertion scoped to the 11-day overlap *and* revoke the legacy root at window close — not to loosen the check. The guardrail is a startup-time and per-session assertion that the leaf root and token issuer root are the same object identity, with the equivalence path as the only sanctioned exception, itself logged and time-bounded. ```python class AnchorDivergenceError(RuntimeError): """Raised when mTLS leaf root and token issuer root differ without a valid equivalence assertion.""" pass def authorize_federated_peer(leaf_chain, token, anchors, equivalence_manifest, now): root_leaf = verify_chain(leaf_chain, anchors) issuer_key = resolve_issuer_key(token.iss, anchors) root_token = verify_chain(signing_cert_of(issuer_key), anchors) # Proof-of-possession is necessary but not sufficient. if not token.cnf_matches(leaf_chain[0]): raise AnchorDivergenceError( f"cnf thumbprint mismatch for aud={token.aud}" ) if root_leaf.identity == root_token.identity: return True assertion = equivalence_manifest.find(root_leaf, root_token, scope=token.aud) if assertion is None: raise AnchorDivergenceError( f"anchor divergence: leaf_root={root_leaf.identity} " f"token_root={root_token.identity} aud={token.aud}; no equivalence assertion" ) if assertion.expires_at <= now or not assertion.signed_by_trusted(anchors): raise AnchorDivergenceError( f"equivalence assertion for {root_leaf.identity}<->{root_token.identity} " f"expired or untrusted at {now}" ) return True ```