# What structural signals indicate a DID-bound agent passport has silently outlived its mTLS channel binding **Date of Record:** 2026 November 27 **Scope:** Applies to cross-organization agent handoffs where an agent presents a decentralized identifier (DID) plus a verifiable credential ("passport") whose `cnf` claim binds it to a mutual-TLS client certificate thumbprint, and where the receiving agent caches that trust decision across tool calls. Does not apply to single-org deployments using a shared CA, nor to stateless per-request auth where the passport is re-verified on every hop. ## Core Distinction The failure is not "expired credential" and not "revoked DID." Both of those are loud: the verifier checks `exp` or a revocation list and rejects. The boundary condition here is subtler — **the passport remains cryptographically valid while the binding between the passport and the live transport channel has silently decoupled.** A DID document resolves, the VC signature verifies against the issuer's key, `exp` is in the future, and the revocation registry is reachable and silent. Every check a naive verifier performs passes. Yet the agent on the far end of the socket is no longer the agent the passport describes, because the mTLS session that originally proved possession of the bound key was terminated and re-established by a different process (a restarted worker, a pooled connection reassigned to another tenant, or an attacker who completed a handshake with a stolen but not-yet-revoked cert). The distinction that matters operationally: **identity verification (does this VC verify?) and channel binding (is the entity I am talking to *right now* the one the VC names?) are two separate invariants, and most agent trust-bootstrapping implementations collapse them into one.** The collapse is invisible until the channel rotates underneath a cached passport. ## What Was Observed A cross-org research agent (`org-a/researcher`) was configured to call a partner's data-retrieval agent (`org-b/fetcher`) under an A2A-style handoff. Trust bootstrap proceeded as follows: 1. `org-a/researcher` opened an mTLS connection to `org-b/fetcher`, presenting client cert `C1` (thumbprint `t1`). 2. `org-b/fetcher` requested the passport. `researcher` returned a VC issued by `org-a`'s trust anchor, containing `cnf: { "x5t#S256": "t1" }`. 3. `fetcher` verified the VC signature, resolved the issuer DID, checked `exp`, checked the revocation list, and confirmed `cnf.x5t#S256 == sha256(C1.pubkey)`. 4. `fetcher` cached the resulting trust tuple `(DID_researcher, scope=[read:dataset-7], t1)` in its session store with a TTL of 3600s — deliberately longer than the underlying connection's idle timeout (300s), because re-running the DID resolution and revocation check on every tool call was deemed too expensive. The failure trace, reconstructed from logs: - At t+310s the mTLS connection idled out and closed. `org-b/fetcher`'s connection pool, under load, immediately reassigned the freed slot. A *different* inbound agent — `org-c/prober`, presenting cert `C2` (thumbprint `t2`) — completed a fresh handshake on the pooled socket. - `org-c/prober` sent a tool call to `fetcher`. Because the session store keyed the cached trust tuple by *socket slot* rather than by the peer's presented cert thumbprint, `fetcher` matched the call to the still-live cached tuple for `org-a/researcher` and authorized `read:dataset-7`. - No signature failed. No DID failed to resolve. No `exp` had passed. The audit log recorded a fully "verified" request attributed to `DID_researcher` that was in fact executed on behalf of `org-c`. The structural signal that this had happened was **not** in the auth path at all. It surfaced only when a downstream consistency check compared the `aud`/`sub` recorded in the tool-call envelope (which `org-c` had populated with its own DID, because the envelope was built by the caller) against the DID in the cached trust tuple `fetcher` had authorized under. The two disagreed. That disagreement — envelope identity vs. authorized identity — is the observable signature of a stale channel binding. ## Condition of Validity The guardrail invariant is: **a cached trust decision is valid only for the specific (peer cert thumbprint, transport session) pair it was derived from, and must be invalidated the instant either component changes.** Concretely, the authorization cache key must be the *presented* `x5t#S256` of the live handshake, never a socket handle, connection-pool slot, or agent-supplied `sub` claim. On every inbound call the receiver must recompute `sha256(peer_cert)` from the TLS layer, look up the cache under that key, and — if the key is absent — either re-run full bootstrap or reject. This invariant holds only under two conditions, both of which are easy to violate: 1. **The mTLS layer must expose the peer certificate to the application on every request, not just at handshake time.** Frameworks that terminate TLS at a proxy and forward only a boolean "client authenticated" header break this: the application cannot recompute the thumbprint, so it cannot key the cache correctly, and it silently falls back to whatever identity the caller asserts. This is the most common way the invariant is lost in practice. 2. **The `cnf` claim must be checked against the live channel, not against the channel at bootstrap time.** A verifier that checks `cnf` once and then trusts the session forever has verified a binding that no longer exists. When either condition fails, the passport is "valid" in the cryptographic sense and "unbound" in the operational sense, and there is no signal at the auth layer that distinguishes these. ## Decision Boundary The decision boundary is between **re-verification cost** and **binding freshness**. Recomputing `sha256(peer_cert)` and a cache lookup is cheap (microseconds); re-resolving a DID and fetching a revocation list is expensive (network round-trip, often 50–500ms). The correct architecture separates these: - **Cheap, per-request, mandatory:** recompute peer cert thumbprint from the live transport, key the authorization cache on it. This is the binding check. - **Expensive, amortized, TTL-bounded:** DID resolution and revocation-list fetch. This is the identity check. The failure mode in the observed incident was that both were amortized together under one TTL keyed on the wrong thing. The boundary rule: **identity material may be cached; channel binding may never be cached across a transport discontinuity.** A cache entry that outlives its transport session is not a cache hit — it is an unverified assertion. A secondary boundary: when the transport is a connection pool, "transport discontinuity" includes *reassignment*, not just close. A pooled socket that is reused by a different peer is a discontinuity even though no close event fired at the application layer. This is why keying on socket identity is unsafe and keying on peer cert thumbprint is mandatory. ## Operational Effect Downstream of a stale binding, three effects compound: 1. **Audit attribution is corrupted, not just access.** Every tool call authorized under the stale tuple is logged against the original DID. The audit trail is internally consistent (it faithfully records what the cache decided) and externally wrong (it attributes `org-c`'s actions to `org-a`). Forensic reconstruction requires correlating the envelope's self-asserted `sub` against the authorized DID — a check nobody runs until an incident. 2. **Revocation is defeated transitively.** If `org-a` revokes `researcher`'s passport mid-session, the revocation list updates, but `fetcher`'s cached tuple is keyed on the wrong identity and its TTL has not expired, so the revoked principal's scope remains live for the remainder of the TTL — and is now reachable by whoever holds the reassigned socket. 3. **Blast radius scales with pool reuse.** Under load, pool slots are reused frequently, so a single mis-keyed cache entry can be exercised by many distinct peers before its TTL lapses. The window of exposure is `TTL × reuse_rate`, not `TTL`. The remediation is structural, not procedural: bind the cache key to the cryptographic channel, fail closed when the peer cert is unavailable to the application, and treat envelope `sub` as an untrusted hint that must match the authorized DID or the call is rejected. ```python import hashlib from dataclasses import dataclass from typing import Optional class StaleChannelBindingError(RuntimeError): """Raised when a cached trust decision is exercised outside the transport session it was derived from, or when the live peer certificate cannot be recomputed to validate the binding.""" pass @dataclass(frozen=True) class TrustTuple: did: str scope: frozenset bound_thumbprint: str # x5t#S256 the passport's cnf claim named expires_at: float def authorize_tool_call( *, live_peer_cert_der: Optional[bytes], cache: dict, envelope_sub: str, requested_scope: str, now: float, ) -> TrustTuple: # Invariant 1: the application MUST be able to see the live peer cert. # If TLS was terminated upstream and only a boolean was forwarded, # we cannot recompute the binding and must fail closed. if live_peer_cert_der is None: raise StaleChannelBindingError( "peer certificate unavailable at application layer; " "channel binding cannot be verified, refusing to authorize" ) live_thumbprint = hashlib.sha256(live_peer_cert_der).hexdigest() # Invariant 2: cache key is the live thumbprint, never a socket # handle, pool slot, or caller-asserted sub. tuple_ = cache.get(live_thumbprint) if tuple_ is None: raise StaleChannelBindingError( f"no trust tuple bound to live channel {live_thumbprint[:12]}...; " "reassignment or unbound session — re-bootstrap required" ) # Invariant 3: the tuple's bound thumbprint must equal the live one. # A mismatch means the entry was cached against a channel that has # since been replaced (the silent-decoupling failure). if tuple_.bound_thumbprint != live_thumbprint: raise StaleChannelBindingError( f"trust tuple bound to {tuple_.bound_thumbprint[:12]}... " f"but live channel is {live_thumbprint[:12]}..." ) if now >= tuple_.expires_at: raise StaleChannelBindingError( f"trust tuple for {tuple_.did} expired at {tuple_.expires_at}" ) # Invariant 4: caller-asserted identity is a hint, not authority. # Disagreement is the observable signature of a stale binding. if envelope_sub != tuple_.did: raise StaleChannelBindingError( f"envelope sub {envelope_sub!r} disagrees with authorized " f"DID {tuple_.did!r} on live channel {live_thumbprint[:12]}..." ) if requested_scope not in tuple_.scope: raise StaleChannelBindingError( f"scope {requested_scope!r} not granted to {tuple_.did}" ) return tuple_ ```