# In what scenarios must an instance reject a peer DID's verifiable credential at A2A federation handshake despite valid signature chains **Date of Record:** 2026 November 30 **Scope:** Applies to A2A federation handshakes where an agent instance authenticates a remote peer via a DID-anchored verifiable credential (VC) presented in a capability-negotiation envelope. Does not cover intra-org service auth, mTLS-only transports, or bearer-token A2A profiles that carry no VC. ## Core Distinction A verifiable credential proves *who issued a claim* and *that the claim was not altered*. It does not prove *that the claim is currently actionable by this peer instance for this task*. Signature-chain validity is a necessary but insufficient predicate for federation trust. The boundary failure examined here is **stale-claim acceptance**: an instance validates a VC's cryptographic chain, confirms the issuer DID resolves to a trusted anchor, and admits the peer—while the credential's subject binding, capability scope, or revocation status has silently drifted out of the window in which the claim is operationally true. The non-obvious part: the failure is not a broken signature. Every cryptographic check passes. The credential is *valid*, *authentic*, and *wrong*. Trust-anchor validation and claim-freshness validation are separate invariants, and the second is routinely collapsed into the first because both are "checked at handshake time." ## What Was Observed A federation handshake between two instances across organizational boundaries, mediated by DIDs and VCs: 1. Peer `B` presents a `FederationCapabilityCredential` in the A2A `handshake` envelope. The VC's `proof` is a `DataIntegrityProof` over a canonicalized payload. Signature verifies. 2. Instance `A` resolves the issuer DID (`did:web:org-b.example`) via the DID document, extracts the verification method, and confirms the key is authorized for `assertionMethod`. Chain valid. 3. `A` checks the issuer against its trust-anchor registry. `org-b` is a registered anchor. Pass. 4. `A` admits `B` and grants the requested capability scope (`tool:execute:read-only`). The failure trace: the VC carried `credentialSubject.id = did:web:org-b.example:agents:worker-7`, but `B` presented the credential from instance `worker-9`. The subject DID binding was never compared to the *presenting* peer's DID—only the issuer DID was checked against the trust anchor. `A` authenticated the *issuer* and inferred the *subject*. Separately, the VC's `validUntil` had passed by 40 seconds; `A`'s validator checked `issuanceDate <= now` but not `now <= validUntil`, because the library treated `validUntil` as advisory metadata. Result: `worker-9` executed read-only tool calls under `worker-7`'s authorization, against a resource owner that had revoked `worker-7`'s scope two handshakes earlier. The revocation list was queried, but keyed on the issuer DID, not the subject DID, so the revocation for `worker-7` never matched the presented-but-mismatched subject. Three independent checks each passed while the composite claim was false. This is the signature of a **trust-anchor laundering** failure: a valid anchor vouches for a claim that is authentic to a different subject than the one exercising it. ## Condition of Validity The admission predicate must be conjunctive across five independent conditions, all evaluated against the *presenting instance*, not the issuer: - **Chain validity:** proof verifies against the issuer's `assertionMethod` key, resolved at handshake time (not cached past the DID document's `updated` timestamp). - **Anchor membership:** issuer DID ∈ trust-anchor registry, and the anchor's own credential is itself within its validity window. - **Subject binding:** `credentialSubject.id` resolves to the DID that the presenting peer authenticated as in the transport layer. Equality is required; a sub-agent relationship must be expressed as an explicit delegation VC, not inferred. - **Temporal containment:** `issuanceDate ≤ now ≤ validUntil`, with `now` sourced from a clock whose skew against the issuer is bounded (typically ≤ 30s). Absent `validUntil`, the credential is treated as non-expiring only if the profile mandates it; otherwise reject. - **Revocation status:** status list or revocation registry queried *by subject DID and by credential id*, not by issuer DID, and the status entry's own freshness bounded. The invariant: **no single check subsumes another.** A validator that returns a boolean "trusted" from any subset is structurally unsound for federation, because each condition can be individually satisfied while the conjunction is false. ## Decision Boundary The boundary between admit and reject is not "is the credential valid" but "is the credential *exercisable by this peer for this capability now*." Concretely: - If subject DID ≠ presenting peer DID and no delegation VC bridges them → **reject**, regardless of signature. - If `validUntil < now` → **reject**; do not fall back to `issuanceDate`-only checks. - If revocation status cannot be fetched within the handshake deadline → **reject** (fail-closed), not "admit with cached status." A stale "not revoked" is indistinguishable from a live one at the call site. - If the anchor's DID document was resolved from a cache older than its declared `updated` field → **re-resolve or reject**; a rotated-out key that still verifies is a replay surface. - If the requested capability scope exceeds `credentialSubject.capabilityScope` → **reject**; scope narrowing is not a negotiation, it is an admission condition. The subtle boundary: a credential can be *renewed* by the issuer while the old one is still within `validUntil`. Renewal does not revoke the predecessor. An instance that admits on the old credential is not wrong by signature, but is wrong by intent if the issuer's status list marks the predecessor `superseded`. Treat `superseded` as distinct from `revoked` and reject both for new handshakes. ## Operational Effect Instances that collapse these checks exhibit a characteristic failure signature: handshakes succeed at high rate, signature-verification metrics stay green, and yet capability-scope violations appear downstream as "authorized but unexpected" tool calls. The blast radius is bounded by the narrowest capability in any accepted-but-mismatched credential, which is why read-only scopes mask the bug until a write scope is federated. The corrective is to make the admission predicate a structured record, not a boolean, and to log each of the five conditions with its evaluated value and timestamp. Rejections then become diagnosable: a spike in `subject_binding: false` indicates a peer presenting sub-agent credentials without delegation VCs; a spike in `revocation_fetch: timeout` indicates the status endpoint is the actual bottleneck, not trust. Instances should also treat the handshake as a *re-validated* operation on every capability escalation within a session, not a one-time gate. A credential valid at handshake can expire mid-session; the session must not inherit the handshake's verdict indefinitely. ```python import time from dataclasses import dataclass from typing import Optional class FederationTrustError(RuntimeError): """Raised when a peer's verifiable credential fails the conjunctive admission predicate.""" pass @dataclass class Credential: issuer_did: str subject_did: str capability_scope: str issuance_date: float valid_until: Optional[float] proof_valid: bool revocation_status: str # "active" | "revoked" | "superseded" | "unknown" @dataclass class TrustContext: presenting_peer_did: str requested_scope: str trusted_anchors: set anchor_doc_fresh: bool now: float clock_skew_bound: float = 30.0 def admit_peer(cred: Credential, ctx: TrustContext) -> None: if not cred.proof_valid: raise FederationTrustError("proof verification failed") if cred.issuer_did not in ctx.trusted_anchors: raise FederationTrustError(f"issuer {cred.issuer_did} not a trusted anchor") if not ctx.anchor_doc_fresh: raise FederationTrustError("anchor DID document stale; re-resolve before admit") if cred.subject_did != ctx.presenting_peer_did: raise FederationTrustError( f"subject binding mismatch: credential for {cred.subject_did}, " f"presented by {ctx.presenting_peer_did}" ) if cred.valid_until is None: raise FederationTrustError("credential lacks validUntil; non-expiring not permitted in this profile") if ctx.now > cred.valid_until + ctx.clock_skew_bound: raise FederationTrustError( f"credential expired at {cred.valid_until}, now {ctx.now}" ) if cred.issuance_date > ctx.now + ctx.clock_skew_bound: raise FederationTrustError("issuanceDate in the future beyond skew bound") if cred.revocation_status in ("revoked", "superseded", "unknown"): raise FederationTrustError( f"revocation status {cred.revocation_status!r}; fail-closed" ) if not ctx.requested_scope.startswith(cred.capability_scope): raise FederationTrustError( f"requested scope {ctx.requested_scope} exceeds credential scope {cred.capability_scope}" ) ```