Skip to content

Verify request signatures in the framework and populate caller identity from the verified signer #1260

Closed

Description

@bokelley

Problem

A seller on the Python SDK that declares request_signing in get_adcp_capabilities has to hand-wire everything that turns a signed request into a caller identity. In 6.6.0 (and on main as of today) adcp.server never calls verify_request_signature, and ToolContext.caller_identity comes only from bearer/ServerCallContext.user. So:

  • An unsigned request to an operation in the seller's own required_for isn't rejected with request_signature_required. It reaches handler code, and sellers write their own identity checks that fail with AUTH_MISSING. Buyers can't tell "you didn't sign" from "we don't know you".
  • The seller must build the keyid → agent_url mapping themselves. AuthInfo.from_verified_signer raises if signer.agent_url is None, but nothing in the SDK populates it without extra configuration.
  • AuthInfo.operator is documented as "for AdCP v3 multi-operator deployments ... most adopters leave None", yet the name invites sellers to require an operator from the authenticated caller. For buyer-declared accounts (require_operator_auth: false) the operator belongs in the request's account.operator.

We saw all three in one production integration: the seller required signatures and returned AUTH_MISSING: Missing operator domain identity to every call, signed or not.

Proposals

  1. When the served capabilities declare request_signing, verify in the framework before dispatch: reject unsigned required_for / protocol_methods_required_for requests with request_signature_required (and the WWW-Authenticate header), and build AuthInfo from the VerifiedSigner via the BuyerAgentRegistry.
  2. Make the keyid → agent_url step explicit and documented, for example a registry method or a brand.json-backed resolver that takes the agent URL. The spec side of how a seller learns an unknown signer's URL is Sellers can't identify an unknown signing agent; clarify buyer-agent identity and the operator for buyer-declared accounts adcp#7814.
  3. Rename or clearly document AuthInfo.operator, and point sellers of buyer-declared accounts at account.operator.
  4. Docs: the spec's Python verifier example uses CachingJwksResolver() with no jwks_uri (a required argument); fix it alongside the SDK docs.

Activity

  1. added
    claude-triagingTriage routine is actively working on this issue (1-3 min)
    on Sep 30, 2026
  2. bokelley commented on Sep 30, 2026

    @bokelley
    ContributorAuthor

    Triage

    Classification: Bug (proposals 1–2) + docs fix (proposals 3–4)
    Bucket(s): signing, handlers (neither label confirmed in repo label list; noted below)
    Status: ready-for-human

    What the experts said:

    • security-reviewer: Proposal 1 is the right direction but has three ship-blocking design questions — fail-closed semantics when VerifyOptions is unconfigured, per-process replay store scope that silently degrades replay protection in multi-instance deployments, and a nonce-replay regression for sellers who already wired middleware and would double-consume the nonce.
    • ad-tech-protocol-expert: Spec mandates MUST-level enforcement; request_signature_required + WWW-Authenticate are spec-correct responses and align with compliance test vectors. Proposal 2 BrandJsonResolver can ship without waiting for adcp#7814. Ship Proposal 1 as a minor version bump when the design questions are resolved.
    • code-reviewer: Dispatch has no raw HTTP bytes by the time it runs, so threading the verifier requires either a new ToolContext field or a pre-dispatch hook — neither is bolt-on. Proposals 3–4 are doc-only; a validate_platform boot guard is the right low-risk scope for Proposal 2.

    My take: Proposals 2–4 are independently implementable now without touching the dispatch layer or raising the architectural questions Proposal 1 requires. Proposal 1 needs a design session to answer the three open questions below before any implementation starts.

    Actionable without Proposal 1:

    • P2 (boot-time guard): In validate_platform / serve.py, fail loudly at startup when request_signing is declared in capabilities but no JWKS resolver is configured. Non-breaking — only misconfigured deployments fail. Files: src/adcp/decisioning/dispatch.py, src/adcp/decisioning/serve.py.
    • P3 (AuthInfo.operator): Two-sentence docstring extension at context.py:109–113 cross-referencing account.operator for require_operator_auth: false accounts.
    • P4 (CachingJwksResolver): Fix the no-args CachingJwksResolver() example in SDK docs — raises TypeError for any adopter who copies it. One-line fix.

    Proposal 1 open questions for human decision:

    1. Verifier injection point — dispatch has no raw HTTP bytes; does the verifier get a new ToolContext field, or does the pre-dispatch hook path get formalized?
    2. Opt-in (auto_verify=True kwarg to serve()) vs. opt-out — what is the migration story for sellers already using verify_starlette_request middleware?
    3. Replay store scope — require an explicit ReplayStore arg, or use the per-process InMemoryReplayStore default with a loud startup warning?

    Label gap: signing and handlers bucket labels do not appear in the repo label list; applying bug for the non-enforcement of declared capabilities.


    Triaged by Claude Code. Session: https://claude.ai/code/session_01QDxxv3yG9vtYETByFP94Pj


    Generated by Claude Code

  3. added
    bugSomething isn't working
    and removed
    claude-triagingTriage routine is actively working on this issue (1-3 min)
    on Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions