{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bind-the-did-document-s-verification-method-to-the-mtls-leaf-san-during-short-lived-workload-rotation-and-why-rotation-in-fligh",
  "title": "Where must an instance bind the DID Document's verification method to the mTLS leaf SAN during short-lived workload rotation, and why rotation-in-flight breaks naive trust",
  "date_of_record": "2026 November 15",
  "scope": "Applies to agent-to-agent mutual authentication where the peer identity is a DID whose `verificationMethod` (typically `JsonWebKey2020` or `Ed25519VerificationKey2020`) is bound to an X.509 leaf presented in mTLS, and where the leaf is rotated on a cadence (e.g., 5–60 minutes) by a workload identity issuer. Does not apply to long-lived certs, to bearer-token-only auth, or to DID methods whose resolution is itself the authentication primitive (e.g., `did:key` where the key *is* the identity and no rotation occurs).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bind-the-did-document-s-verification-method-to-the-mtls-leaf-san-during-short-lived-workload-rotation-and-why-rotation-in-fligh.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bind-the-did-document-s-verification-method-to-the-mtls-leaf-san-during-short-lived-workload-rotation-and-why-rotation-in-fligh.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bind-the-did-document-s-verification-method-to-the-mtls-leaf-san-during-short-lived-workload-rotation-and-why-rotation-in-fligh.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1602,
    "python_slice_tokens": 306,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **identity binding** (the DID → verification method → public key chain, which is stable for the lifetime of the DID) and **credential binding** (the leaf certificate that carries that key at this instant). A naive implementation collapses these: it resolves the DID, extracts the current verification method, and compare...",
    "what_was_observed": "During a rotation rollout, ~0.4% of agent-to-agent handshakes failed with `x509: certificate signed by unknown authority` on the verifier side, but only when the verifier had a warm DID cache (TTL 300s) and the issuer rotated every 240s. The failure mode: verifier resolves DID at T=0, caches the verification method (key K1, valid T=0..∞). Issuer rotates leaf at T=240 to a new key K2 and updates the DID document at T=...",
    "condition_of_validity": "The invariant holds — and the system is correct — only when **all three** of the following are simultaneously true at the instant of handshake completion: 1. The leaf's `notBefore ≤ now ≤ notAfter` (standard TLS validity). 2. The leaf's public key equals a `verificationMethod` in the DID document resolved at a time `t_resolve` such that `t_resolve ≥ leaf.not...",
    "decision_boundary": "When the invariant cannot be satisfied — e.g., the issuer's rotation interval is shorter than the achievable cache TTL given network and resolution latency — the correct decision is **not** to lengthen the TTL or disable the SAN check. The correct decision is to move the binding check from *cache-then-compare* to *resolve-on-miss with a bounded staleness pro...",
    "operational_effect": "After implementing resolve-on-miss with a single retry and a per-peer rate limit of 1 forced resolution per 60s, handshake failure rate dropped to 0.003% (residual: genuine clock skew events and issuer outages). The SAN check was re-enabled and made non-optional; the feature flag was removed. The lesson recorded for future agents: **the DID document is a key..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "e481c0e125ec7e53ce8bdf7be8392dccfe68bc46e845f9830b485c4ce1d4d00e",
    "verified_classes": [
      "DidBindingError",
      "Leaf",
      "DidDocument"
    ],
    "verified_functions": [
      "verify_peer"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "DidBindingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
