{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-reject-a-verified-agent-card-the-key-substitution-window-in-a2a-v1-0-well-known-discovery",
  "title": "When must an instance reject a verified Agent Card: the key-substitution window in A2A v1.0 well-known discovery",
  "date_of_record": "2026 November 28",
  "scope": "Applies to A2A v1.0 agents that discover peer capability metadata by fetching `/.well-known/agent.json` (or the versioned `/.well-known/agent-card.json`) and validating a detached JWS signature over the card body. Does not cover in-band capability negotiation that occurs after the first successful task submission, nor does it cover transport-level mTLS identity.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-verified-agent-card-the-key-substitution-window-in-a2a-v1-0-well-known-discovery.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-verified-agent-card-the-key-substitution-window-in-a2a-v1-0-well-known-discovery.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-verified-agent-card-the-key-substitution-window-in-a2a-v1-0-well-known-discovery.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2290,
    "python_slice_tokens": 538,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A signed Agent Card proves *authorship of a byte string at signing time*. It does not prove *that the signing key belongs to the agent named in the card*, nor *that the key was authoritative at the moment of verification*. The A2A v1.0 well-known discovery path collapses these three claims into one step: fetch the card, fetch the `jwks_uri` (or embedded `ver...",
    "what_was_observed": "A discovery routine fetched `https://peer.example/.well-known/agent.json`, received a 200 with a card whose `signatures[0].protected` header declared `alg: ES256`, `kid: peer-2024-11`, and whose `verificationMethod` pointed to `https://peer.example/.well-known/jwks.json`. The routine fetched that JWKS, found the matching `kid`, and verified the detached JWS over the canonicalized card body. Verification passed. The a...",
    "condition_of_validity": "The verification routine is only sound when all of the following hold as *preconditions checked before signature verification*, not as post-hoc assertions: - **Key provenance is external.** The `kid` must resolve against a key set obtained from a trust anchor that is not the card's own `verificationMethod`/`jwks_uri`. In practice: a pinned JWKS fetched at en...",
    "decision_boundary": "The decision boundary is the point at which the verifier must choose between *trusting the card's self-declared key resolution* and *refusing to proceed until out-of-band key material is supplied*. Concretely: - If the resolved key set came from the card's own `verificationMethod` and no pinned key set exists for this issuer, **reject**. This is the poisoned...",
    "operational_effect": "The observable consequence of getting this wrong is a **silent trust promotion**: the agent's discovery layer reports `verified: true`, the task-submission layer treats the peer as authenticated, and a warrant is delegated to an endpoint that never proved it controls the identity it claims. Because the signature is cryptographically valid, no downstream aler..."
  },
  "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": "f295dfb00dff0d99aa8b742ddf64cffe644c311b48f707093fad62087d166847",
    "verified_classes": [
      "CardVerificationError",
      "KeySubstitutionError",
      "UnanchoredCardError",
      "PinnedKey"
    ],
    "verified_functions": [
      "_canonicalize",
      "_resolve_pinned_key",
      "verify_agent_card",
      "_b64url_decode",
      "_jws_verify"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 9,
    "raised_exceptions": [
      "CardVerificationError",
      "KeySubstitutionError",
      "UnanchoredCardError"
    ],
    "sample_fail_closed_invariants": [
      "card carries no signatures",
      "no signature verified"
    ],
    "stdlib_dependencies": [
      "base64",
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
