# What structural signals indicate DID key-binding divergence during cross-org federated agent identity resolution **Date of Record:** 2026 November 21 **Scope:** Applies to federated agent-to-agent authentication where a relying agent resolves a peer's DID document, verifies a verifiable credential (VC), and binds the VC subject to a public key via `assertionMethod`/`authentication` relationships. Does not cover single-org internal auth or bearer-token delegation without DID anchoring. ## Core Distinction The failure of interest is not signature verification failure — a bad signature is loud and immediate. It is **key-binding divergence**: the VC verifies correctly against a key, the DID document resolves correctly, and yet the key the VC was signed with is no longer the key the DID document authoritatively binds to the subject *at the moment of resolution*. The verifiable-credential layer treats the binding as a static fact; the DID layer treats it as a mutable, rotatable, multi-relationship graph. An agent that verifies the VC in isolation and resolves the DID in isolation, then assumes the two agree, has skipped the one step that actually matters: confirming that the `verificationMethod` referenced in the VC's `proof` is still present, still authorized for the relevant relationship, and still controlled by the subject, *in the resolved document version*. This is non-obvious because both halves succeed. There is no error to catch unless you explicitly cross-check the binding. ## What Was Observed A relying agent (Org B) received a task-delegation VC from a peer agent (Org A) asserting `capability: invoice-approval` up to a threshold. The VC's `proof.verificationMethod` pointed to `did:web:org-a.example#key-2`. Resolution of `did:web:org-a.example` returned a document whose `verificationMethod` array contained `#key-2`, but whose `authentication` relationship referenced only `#key-3`, and whose `assertionMethod` referenced `#key-3`. Key `#key-2` had been rotated out of the authorization relationships 40 minutes earlier — the key object remained in the document (for historical verification of old signatures) but was no longer bound to any relationship that grants assertion authority. The relying agent's verification pipeline did the following, in order: 1. Parsed the VC, extracted `proof.verificationMethod` = `#key-2`. 2. Resolved the DID document, located `#key-2` in `verificationMethod`, extracted its `publicKeyJwk`. 3. Verified the VC signature against that key. **Passed.** 4. Checked the VC's `issuer` field matched the DID. **Passed.** 5. Granted the capability. The grant was wrong. `#key-2` was a *resolvable* key but not an *authorized* key. The relying agent conflated "the key material exists in the document" with "the key is bound to an assertion relationship." The peer agent had rotated keys and continued signing with the retired key because its own local signer had not been updated — a stale-signer condition on the issuer side compounded the stale-binding condition on the verifier side. Both sides were internally consistent; the federation boundary between them was not. The divergence was detected only when an auditor agent replayed the delegation three hours later against a freshly resolved document and found the `proof.verificationMethod` absent from `assertionMethod`. The replay used the current document, not the document version current at signing time — a second, distinct divergence (see below). ## Condition of Validity The invariant that must hold for a successful binding is: > For a VC with `proof.verificationMethod = D#K` issued by subject `S` for relationship `R`, the DID document resolved at verification time must contain `K` in `verificationMethod`, **and** `D#K` must appear in the `R` relationship array (`authentication`, `assertionMethod`, or `capabilityInvocation` as appropriate to the VC's use), **and** the resolution must be pinned to a document version whose `updated` timestamp is at or after the VC's `issuanceDate` but reflects the binding state the issuer intended. Three conditions, and the third is the one that breaks silently. DID documents are versioned; a VC signed at T1 and verified at T2 may resolve a document updated at T3 > T2. If the key was valid at T1 and revoked at T3, verification at T2 against the T3 document produces a false negative (rejecting a valid-at-issuance credential). If the key was valid at T1 and rotated at T3 but the verifier resolves a cached T1 document, verification at T2 produces a false positive (accepting a credential whose key is no longer authorized). The valid window is the intersection: `issuanceDate ≤ verification time ≤ key-validity-end`, resolved against a document version that reflects the key state at verification time, not at issuance time. ## Decision Boundary The boundary is between **key existence** and **key authorization**, and it is crossed the moment a verifier extracts key material from `verificationMethod` without checking relationship membership. The correct decision procedure is: - Reject if `proof.verificationMethod` is not present in `verificationMethod`. (Loud failure — most verifiers catch this.) - Reject if `proof.verificationMethod` is not a member of the relationship array required by the VC's semantics. (Silent failure — most verifiers miss this.) - Reject if the resolved document's `updated` timestamp is earlier than the VC's `issuanceDate` by more than clock skew, because you are verifying against a stale binding. (Silent failure — almost all verifiers miss this.) - Reject if the key is present in the relationship but marked `revoked` in a `revocationRegistry` or equivalent. (Loud only if you check the registry; silent if you trust the relationship array alone.) The non-obvious case is the second bullet combined with the third: a key present in `verificationMethod`, absent from the relationship, resolved from a cached pre-rotation document. Every individual check the naive verifier runs passes. The binding is broken. The structural signal is the **set difference** between `verificationMethod` and the union of relationship arrays — a non-empty difference containing the `proof.verificationMethod` is the exact indicator of divergence. ## Operational Effect When this divergence goes undetected, the operational consequence is not a crash but a **capability grant with a revoked warrant**. The relying agent proceeds to execute the delegated task under a capability the issuer no longer authorizes. In the observed case, the peer agent's stale signer continued to issue delegations for 40 minutes after rotation, and the relying agent's stale resolver continued to accept them. The blast radius is bounded only by how long the stale signer runs and how long the resolver caches — two independent clocks that no single party observes. The guardrail is a **binding-consistency check** that runs as a distinct step between signature verification and capability grant, and that fails closed on any of the four conditions above. It must resolve the document fresh (or against a version pinned to verification time, not issuance time), compute the relationship-set membership explicitly, and treat the set difference as a hard error rather than a warning. Caching the resolved document is permitted only with a TTL bounded by the issuer's rotation cadence, and the cache key must include the `proof.verificationMethod` so that a rotated key invalidates the cached binding. The issuer side must additionally enforce that its signer's key is present in the active relationship array before signing — a stale signer is a bug on the issuer, but the verifier cannot assume the issuer is correct. ```python import time from dataclasses import dataclass class KeyBindingDivergence(RuntimeError): """Raised when a VC's proof key is resolvable but not authorized for the required relationship.""" @dataclass class DidDocument: did: str updated: float verification_method: dict # key_id -> public_key_jwk authentication: list # key_ids assertion_method: list # key_ids capability_invocation: list # key_ids revoked: set # key_ids REQUIRED_RELATIONSHIP = { "assertion": "assertion_method", "authentication": "authentication", "capability": "capability_invocation", } def check_binding( doc: DidDocument, proof_key_id: str, vc_issuance: float, required_relationship: str, clock_skew: float = 60.0, ) -> None: # 1. Key must exist in the document. if proof_key_id not in doc.verification_method: raise KeyBindingDivergence( f"proof key {proof_key_id} absent from verificationMethod of {doc.did}" ) # 2. Key must be a member of the relationship array required by VC semantics. rel_attr = REQUIRED_RELATIONSHIP[required_relationship] authorized = getattr(doc, rel_attr) if proof_key_id not in authorized: diff = set(doc.verification_method) - set( doc.authentication + doc.assertion_method + doc.capability_invocation ) raise KeyBindingDivergence( f"proof key {proof_key_id} resolvable but not in {rel_attr}; " f"unbound keys present in document: {sorted(diff)}" ) # 3. Document must not predate the credential (stale-binding guard). if doc.updated + clock_skew < vc_issuance: raise KeyBindingDivergence( f"resolved document updated={doc.updated} predates vc issuance={vc_issuance}; " f"binding state is stale" ) # 4. Key must not be revoked. if proof_key_id in doc.revoked: raise KeyBindingDivergence(f"proof key {proof_key_id} is revoked in {doc.did}") def verify_and_grant(doc, proof_key_id, vc_issuance, relationship, capability): check_binding(doc, proof_key_id, vc_issuance, relationship) return {"granted": capability, "key": proof_key_id, "at": time.time()} ```