When must an instance refuse a federated DID attestation it can cryptographically verify
**Date of Record:** 2026 December 1 **Scope:** Applies to cross-org agent trust federation where an instance accepts a peer agent's identity via a pairwise, DID-bound attestation (verifiable credential) presented during handoff or MCP/A2A session establishment. Does not apply to single-org deployments where all agents share one DID method controller and one trust root.
Core Distinction
The failure mode is not "bad signature." A signature over a DID document is a *syntactic* fact: given the public key material and the canonicalized payload, verification is deterministic and cheap. The dangerous boundary is the gap between **cryptographic validity** and **authorizational validity** — a pairwise attestation can verify perfectly while the binding it asserts is *stale, revoked, or scoped to a different pairwise relationship than the one currently in use*.
Pairwise DIDs make this sharper than shared-DID federation. Each (issuer-agent, subject-agent) pair gets its own DID, so a subject agent legitimately holds *many* valid credentials asserting the same capability, each bound to a different pairwise DID. An instance that verifies "this credential is valid and the subject controls the pairwise DID" has proven almost nothing about whether *this* pairwise DID is the one the current session should trust. The invariant is: **a verifiable attestation is a claim about a pairwise binding, not a grant of authority for the current channel. Authority requires that the presented pairwise DID equal the DID negotiated for this session, and that the binding be current at the moment of use.**
What Was Observed
A federated handoff between Org A (caller) and Org B (tool-provider) proceeded as follows:
- Org A's orchestrator agent `a-7` holds a pairwise DID `did:peer:a7↔b3` established with Org B's `b-3` six weeks earlier, plus a signed attestation `VC_a7b3` from Org A's issuer asserting `a-7` may invoke `b-3`'s `write_inventory` capability.
- Org B rotated `b-3`'s pairwise DID after a key-compromise drill, minting `did:peer:a7↔b3'`. The old binding was revoked in Org A's revocation list but the *revocation event* propagated to Org B's verifier cache with a TTL of 1 hour.
- During the propagation window, Org A's `a-7` replayed `VC_a7b3` (still signature-valid, subject DID still resolvable because peer DIDs are self-certifying and never "disappear"). Org B's verifier checked: signature ✓, subject controls `did:peer:a7↔b3` ✓, capability scope matches ✓, not expired ✓. It admitted the call.
- The call mutated inventory under an identity (`b-3`'s old pairwise binding) that Org B had already decided to retire. The audit log recorded the write under a DID that no longer corresponded to any live session on Org B's side, and the post-incident reconciliation could not attribute the mutation to a current principal.
The signature was never wrong. The *binding* was wrong, and the verifier had no invariant forcing it to check binding freshness against the session's negotiated DID.
Condition of Validity
A pairwise DID attestation is authorizational only when all of the following hold *simultaneously at the instant of admission*:
- **Pairwise identity match:** the `subject` DID in the credential equals the DID negotiated for the current transport session (the DID the peer presented in the A2A/MCP handshake), not merely a DID the peer can prove control of.
- **Binding liveness:** the (issuer, subject) pairwise binding is present in the issuer's current binding set — i.e., not superseded by a rotation and not in a revocation window. "Not expired" is insufficient; rotation creates a *superseded-but-unexpired* state that naive `exp`-only checks miss.
- **Scope containment:** the capability asserted is a subset of what the *current* session's negotiated capability set permits, re-evaluated per call, not cached from handshake.
- **Issuer authority at issuance time:** the issuer DID was authorized to mint this class of attestation when the credential was signed — distinct from being authorized now.
If any of these is unverifiable (e.g., revocation list unreachable, binding set stale beyond tolerance), the correct action is **refuse and fail closed**, not "accept because signature is valid."
Decision Boundary
The decision boundary is between *verifiable* and *admissible*. Concretely:
- A credential whose subject DID ≠ session DID → **refuse**, even if signature valid. This is the pairwise-mismatch case.
- A credential whose pairwise binding is superseded by a rotation but not yet reflected in local cache → **refuse pending refresh**; do not admit on cache-hit alone when the cache age exceeds the rotation-propagation SLA.
- A credential whose scope exceeds the current session's negotiated capabilities → **refuse the specific call**, retain session.
- A credential whose issuer authority is indeterminate (issuer DID unresolvable) → **refuse**, do not fall back to "trust the signature."
The boundary is *not* "is the crypto valid." It is "does the verified claim describe the binding this session is actually operating under, right now."
Operational Effect
Systems that collapse the two checks exhibit a characteristic failure signature: **post-hoc unattributable mutations**. Writes, tool invocations, and state changes succeed and are logged, but reconciliation against live principals fails because the admitting DID was retired. The blast radius is bounded only by the revocation-propagation window and the cache TTL — which is exactly the window an adversary (or a benign replay) will occupy.
The guardrail is a **binding-freshness invariant enforced at admission, not at handshake**: every attested call re-checks subject-DID-equals-session-DID and binding-liveness against a source whose staleness is bounded and declared. Caching a handshake-time "trusted" boolean is the antipattern; the boolean must be recomputed per call or carry an explicit freshness proof.
import time
from dataclasses import dataclass
class FederatedAttestationError(RuntimeError):
"""Raised when a cryptographically valid attestation is not authorizational."""
pass
@dataclass(frozen=True)
class Attestation:
issuer_did: str
subject_did: str # pairwise DID bound in the credential
capability: str
not_after: float
signature_valid: bool
@dataclass(frozen=True)
class Session:
peer_did: str # DID negotiated for THIS transport session
negotiated_capabilities: frozenset
established_at: float
def admit(att: Attestation, sess: Session, binding_set: dict,
revocation_list: set, cache_age_s: float,
max_cache_age_s: float, now: float | None = None) -> None:
"""Admission gate. Verifies crypto AND authorization. Fails closed."""
now = time.time() if now is None else now
# 1. Crypto is necessary, never sufficient.
if not att.signature_valid:
raise FederatedAttestationError(
f"signature invalid for {att.subject_did}")
# 2. Pairwise identity must match the session's negotiated DID.
if att.subject_did != sess.peer_did:
raise FederatedAttestationError(
f"pairwise mismatch: credential subject {att.subject_did} "
f"!= session DID {sess.peer_did}")
# 3. Binding must be live: not revoked, not superseded by rotation.
if att.subject_did in revocation_list:
raise FederatedAttestationError(
f"binding {att.subject_did} revoked")
live = binding_set.get((att.issuer_did, att.subject_did))
if live is None:
raise FederatedAttestationError(
f"no live binding for ({att.issuer_did},{att.subject_did})")
if live != att.subject_did:
# rotation superseded this pairwise DID
raise FederatedAttestationError(
f"binding superseded: current is {live}, presented {att.subject_did}")
# 4. Freshness: refuse if cache staleness exceeds declared tolerance.
if cache_age_s > max_cache_age_s:
raise FederatedAttestationError(
f"binding cache stale ({cache_age_s:.0f}s > {max_cache_age_s:.0f}s); "
"refuse pending refresh")
# 5. Scope containment against CURRENT session capabilities.
if att.capability not in sess.negotiated_capabilities:
raise FederatedAttestationError(
f"capability {att.capability} outside session scope")
# 6. Temporal validity.
if now >= att.not_after:
raise FederatedAttestationError(
f"attestation expired at {att.not_after}")
# Admitted: verified AND authorizational for this session.
return None