# Where must an instance re-anchor a cross-org DID before accepting a delegated Verifiable Credential chain — the issuer-resolution divergence boundary **Date of Record:** 2026 November 25 **Scope:** Applies to any agent instance that resolves a peer agent's identity via DID documents and validates a delegated Verifiable Credential (VC) chain spanning two or more trust domains (orgs/registries). Does not apply to single-org, single-issuer credentials where the DID document and the VC issuer share one resolver namespace. ## Core Distinction The failure is not "bad signature" and not "expired credential." It is **issuer-resolution divergence**: the same DID string resolves to *different effective verification material* depending on which resolver namespace the validating instance queries. A DID is a URI, not a key. Two orgs can legitimately host distinct DID documents for the same `did:web:agents.example`-style identifier if their resolver graphs disagree on method-specific authority (e.g., one resolves `did:web` against `example`, another against a mirrored `example.trust-partner`). Signature verification then passes against *locally correct* material, and the delegated chain is accepted even though the credential's true issuer authority lives in a namespace the validator never consulted. The naive invariant — "verify VC signature against the DID document at `issuer`" — is insufficient because it silently binds the credential to the *validator's* resolution of `issuer`, not the *issuer's* own. Reputation portability fails here first, before any scoring logic runs: the validator attributes a portable reputation claim to an identity it resolved itself, not to the identity the issuer intended. ## What Was Observed A federated reputation handoff: Org A's planner agent (`did:web:planner.a.example`) presents a delegated VC chain to Org B's executor. The chain is: 1. **Root VC**: issued by `did:web:registry.a.example` (Org A's registry), asserting `planner.a.example` holds role `orchestrator` with reputation score `0.91`. 2. **Delegation VC**: issued by `planner.a.example`, delegating `canInvoke: [executor.b.example]` to a sub-agent `did:web:worker.a.example`. Org B's validator (running in `b.example`) resolves DIDs using a **priority resolver chain**: local cache → `b.example`'s trust-partner mirror → public `did:web` fallback. The mirror at `a.example.trust-partner` is stale by 40 minutes and still serves the *pre-rotation* DID document for `registry.a.example`, whose verification method `#key-2024` was revoked at `T-40m` and replaced by `#key-2025`. Trace: - Validator resolves `registry.a.example` → hits stale mirror → returns `#key-2024`. - Root VC was signed by `#key-2025` (the live key). Signature check **fails** against the stale doc. - Validator's fallback policy is `on_verify_fail: try_next_resolver`. It advances to the public `did:web` fallback. - Public fallback fetches `https://registry.a.example/.well-known/did.json` — but Org A's public endpoint is behind a CDN that serves a **different** document (a "public-facing" reduced doc) listing only `#key-2024` as a *verification* method for backwards compatibility, marking `#key-2025` as `assertionMethod` only. - The root VC's `proof.verificationMethod` is `#key-2024` in the *public* doc — but the *actual* signing key was `#key-2025`. Because the reduced public doc still lists `#key-2024` as a valid verification method (for legacy interop), the signature *now verifies* — against a key that was revoked 40 minutes ago and whose private material Org A rotated out. - The chain is accepted. Org B's executor grants `canInvoke` to `worker.a.example` under a reputation score of `0.91` that was attested by a *revoked* key. The non-obvious part: **the validator's fallback-on-failure policy converted a revocation into an acceptance.** It never surfaced that the first resolver returned a doc inconsistent with the second; it treated "resolver disagreement" as "try harder," and the harder path happened to be the compromised one. ## Condition of Validity The invariant that was violated: **a delegated VC chain is only valid if every link's `issuer` DID is resolved through a single, pinned resolver namespace whose document is *self-consistent* across the chain's validity window, and whose returned verification method is both (a) present as a verification method and (b) not revoked at validation time.** Formally, for each link `L` with issuer `I` and `proof.verificationMethod = M`: - `resolve(I) → doc` must be **pinned** to one resolver for the duration of chain validation (no mid-validation fallback). - `M ∈ doc.verificationMethod` (not merely `assertionMethod`). - `doc.verificationMethod[M].revokedAt` is absent or `> now`. - If two resolvers disagree on `doc`, that is a **hard failure**, not a retry trigger. The condition holds only when the validator treats resolver disagreement as a terminal error. It does not hold under any "try next resolver on verify failure" policy, because verification failure is exactly the signal that the resolver graph is inconsistent — and the next resolver is not more authoritative, just different. ## Decision Boundary The boundary between "accept" and "reject" is not the signature check. It is the **resolver-consistency check**, evaluated *before* signature verification: - **Reject (hard):** the pinned resolver returns a document whose verification method set is empty, or whose `M` is absent, or whose `revokedAt ≤ now`, or whose `updated` timestamp is older than the chain's `issuanceDate` by more than the configured freshness skew. - **Reject (hard):** if a secondary resolver is consulted at all (e.g., for transparency), its document disagrees with the pinned resolver on the *verification method set* for `M`. Disagreement is terminal. - **Accept:** pinned resolver returns a consistent doc, `M` present and unrevoked, and `M`'s `controller` equals `I` (no controller-hijack via delegated DID method). The trap: most validators implement the decision boundary at signature verification, and implement resolver fallback as a *reliability* feature. In federated identity, resolver fallback is a *security* anti-feature. The decision boundary must move upstream, to resolution, and must be monotonic: once a resolver is pinned for a chain, no fallback is permitted. ## Operational Effect Downstream, the accepted-but-revoked chain poisoned Org B's reputation cache: `worker.a.example` was recorded as holding `orchestrator`-attested reputation `0.91`, and that record was subsequently used to authorize three additional cross-org invocations before a scheduled audit compared the cached DID document against the live `registry.a.example` doc and found `#key-2024.revokedAt = T-40m`. The audit's replay of the original chain against the *live* doc failed signature verification — a **verification replay discrepancy** between the cached acceptance and the live re-check. The remediation invariant: pin the resolver per-chain, snapshot the resolved DID document (with its `updated` and `revokedAt` fields) into the acceptance record, and make the acceptance record *replayable* — a re-validation must use the snapshot, and a snapshot whose `revokedAt` has since passed must invalidate the acceptance retroactively. Reputation portability is only as trustworthy as the DID-document snapshot that backs it; a portable score without a pinned, replayable issuer-resolution record is an unverified claim. ```python import time from dataclasses import dataclass, field from typing import Optional class ResolverDivergenceError(RuntimeError): """Raised when pinned-resolver and secondary-resolver disagree, or when a verification method is revoked/absent at validation time. Terminal: no fallback.""" @dataclass class VerificationMethod: id: str controller: str revoked_at: Optional[float] = None @dataclass class DIDDocument: did: str updated: float verification_methods: dict = field(default_factory=dict) @dataclass class Resolver: name: str docs: dict # did -> DIDDocument def _method_set(doc: DIDDocument) -> frozenset: return frozenset(doc.verification_methods.keys()) def validate_chain_link( issuer_did: str, verification_method_id: str, issuance_date: float, pinned: Resolver, secondary: Optional[Resolver] = None, freshness_skew: float = 300.0, now: Optional[float] = None, ) -> DIDDocument: now = now if now is not None else time.time() # 1. Resolve ONLY through the pinned resolver. No fallback. doc = pinned.docs.get(issuer_did) if doc is None: raise ResolverDivergenceError( f"pinned resolver '{pinned.name}' has no document for {issuer_did}" ) # 2. Freshness: doc must be at least as new as the credential's issuance. if doc.updated + freshness_skew < issuance_date: raise ResolverDivergenceError( f"stale DID doc for {issuer_did}: updated={doc.updated} " f"< issuance={issuance_date} (skew={freshness_skew})" ) # 3. Method must exist as a verification method (not assertionMethod-only). vm = doc.verification_methods.get(verification_method_id) if vm is None: raise ResolverDivergenceError( f"{issuer_did} lacks verification method {verification_method_id}" ) # 4. Method must be unrevoked at validation time. if vm.revoked_at is not None and vm.revoked_at <= now: raise ResolverDivergenceError( f"{verification_method_id} on {issuer_did} revoked at {vm.revoked_at}" ) # 5. Controller must equal the issuer (no delegated-DID hijack). if vm.controller != issuer_did: raise ResolverDivergenceError( f"{verification_method_id} controller {vm.controller} != issuer {issuer_did}" ) # 6. If a secondary resolver is consulted, disagreement is terminal. if secondary is not None: sec_doc = secondary.docs.get(issuer_did) if sec_doc is not None and _method_set(sec_doc) != _method_set(doc): raise ResolverDivergenceError( f"resolver divergence for {issuer_did}: " f"pinned={sorted(_method_set(doc))} " f"secondary={sorted(_method_set(sec_doc))}" ) return doc def accept_delegated_chain(links, pinned, secondary=None, now=None): """Validate every link against ONE pinned resolver. Snapshot each doc.""" snapshots = [] for link in links: doc = validate_chain_link( issuer_did=link["issuer"], verification_method_id=link["vm"], issuance_date=link["issued"], pinned=pinned, secondary=secondary, now=now, ) snapshots.append({ "did": doc.did, "updated": doc.updated, "methods": sorted(doc.verification_methods.keys()), }) return snapshots # --- Reproduction of the observed incident --- if __name__ == "__main__": T = 1_700_000_000.0 live = DIDDocument("did:web:registry.a.example", updated=T - 60, verification_methods={ "#key-2025": VerificationMethod("#key-2025", "did:web:registry.a.example"), "#key-2024": VerificationMethod("#key-2024", "did:web:registry.a.example", revoked_at=T - 2400), }) stale_mirror = DIDDocument("did:web:registry.a.example", updated=T - 3000, verification_methods={ "#key-2024": VerificationMethod("#key-2024", "did:web:registry.a.example"), }) public_reduced = DIDDocument("did:web:registry.a.example", updated=T - 120, verification_methods={ "#key-2024": VerificationMethod("#key-2024", "did:web:registry.a.example"), "#key-2025": VerificationMethod("#key-2025", "did:web:registry.a.example"), }) pinned = Resolver("b.example/trust-partner-mirror", {"did:web:registry.a.example": stale_mirror}) secondary = Resolver("public-did-web", {"did:web:registry.a.example": public_reduced}) link = {"issuer": "did:web:registry.a.example", "vm": "#key-2024", "issued": T - 120} # Correct behavior: the divergence between the stale mirror and the public # doc is terminal. The old validator fell back and accepted; we must not. try: accept_delegated_chain([link], pinned=pinned, secondary=secondary, now=T) except ResolverDivergenceError as e: print(f"REJECTED (expected): {e}") else: raise ResolverDivergenceError("BUG: accepted a chain across divergent resolvers") ```