{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-validate-the-a2a-agent-card-s-signatures-jws-payload-against-the-discovered-key-set-rather-than-the-card-s-self-declared-kid-an",
  "title": "Where must an instance validate the A2A agent card's `signatures[].jws` payload against the *discovered* key set rather than the card's self-declared `kid`, and why lazy validation at first task submission silently defeats cross-org delegation",
  "date_of_record": "2026 November 30",
  "scope": "Applies to A2A v1.0 agent-to-agent delegation where the caller resolves a remote agent card from a well-known URI, verifies a detached JWS over the card, and then submits a task to the card's declared endpoint. Does not cover intra-process tool calls, MCP server negotiation, or opaque bearer-token transports that carry no card signature.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-validate-the-a2a-agent-card-s-signatures-jws-payload-against-the-discovered-key-set-rather-than-the-card-s-self-declared-kid-an.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-validate-the-a2a-agent-card-s-signatures-jws-payload-against-the-discovered-key-set-rather-than-the-card-s-self-declared-kid-an.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-validate-the-a2a-agent-card-s-signatures-jws-payload-against-the-discovered-key-set-rather-than-the-card-s-self-declared-kid-an.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1544,
    "python_slice_tokens": 218,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The A2A v1.0 agent card is a *signed capability advertisement*, not a credential. Two verification questions get conflated in practice: 1. **Authenticity of the advertisement** — did the org that controls the well-known URI actually publish this card, and has it not been mutated in transit or by a compromised CDN edge? 2. **Authorization to act on the task**...",
    "what_was_observed": "A two-org delegation flow: Org A's orchestrator agent resolves Org B's card at `https://b.example.com/.well-known/agent.json`, parses `signatures[0]` (`protected` header carries `{\"alg\":\"ES256\",\"kid\":\"b-2024-11\"}`, `signature` over the base64url-encoded card body), and defers verification until the first task is actually submitted, at which point it calls a helper `verify_card(card)` that does: Three distinct failure...",
    "condition_of_validity": "The lazy-at-submission pattern is only sound when **all** of the following hold, which in cross-org settings they rarely do: - The `kid` resolves within a key set that the caller independently trusts (pinned at onboarding, not discovered from the card). - The card body verified at T1 is byte-identical to the body whose `url`/`skills[].endpoint` the caller is...",
    "decision_boundary": "The boundary is between *verifying an object* and *authorizing an action on that object*. A card signature answers only the first. The moment an instance uses `card.url` or `card.skills[i].endpoint` to emit bytes, it has crossed into the second and must be holding a key resolved from a trust anchor, plus a hash of the exact verified body it is routing agains...",
    "operational_effect": "Eager, anchor-bound verification converts a class of silent cross-org payload leaks and nondeterministic delegation failures into a single deterministic pre-flight rejection. The cost is one extra JWKS fetch at discovery and a pinned-body hash carried through the task state. The benefit is that a compromised edge, a key rotation race, or a `kid` collision fa..."
  },
  "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": "287fa44a9185faf8b2801e6d1a2cc4255604977b00895fb0421027c74d9d6570",
    "verified_classes": [
      "CardVerificationError",
      "TrustAnchor"
    ],
    "verified_functions": [
      "verify_card_at_discovery",
      "submit_task"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CardVerificationError"
    ],
    "sample_fail_closed_invariants": [
      "signature invalid under pinned key",
      "card mutated between discovery and submission"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
