Skip to content

Build Web Bot Auth on http-message-signatures instead of a hand-written RFC 9421 layer #1511

Closed

Description

@KonstantinMirin

Problem

adcp.signing hand-writes the Web Bot Auth (WBA) signature base, a structured-field lexer, and directory verification (wba.py, _structured_fields.py, canonical.py). Every interop defect found so far came from that copy: the 32-byte nonce, the duplicate _base, and the directory rules stricter than the drafts. A maintained RFC 9421 library already covers the profile.

Evidence

I ran the AdCP WBA vectors (adcp#7894) and the Cloudflare-generated fixtures from adcp-client#3250 through pyauth's http-message-signatures 2.0.1 (Apache-2.0, about 148k downloads a month):

  • Every positive vector verifies: a single signer, the relay request with both labels, and the signed key directory ("@authority";req).
  • All four Cloudflare fixtures and their signed directories verify.
  • Requests it signs verify in Cloudflare's web-bot-auth 0.2.0 and in Go's yaronf/httpsign.

The one gap is the key and req component parameters, already reported upstream as pyauth/http-message-signatures#29. With a resolver of about 25 lines through the library's own extension point (component_resolver_class=), every result above holds, so the fix belongs upstream as a PR, not in the SDK. The WBA draft author's own Python helper (bot-auth, used by Cloudflare's httpie-web-bot-auth example) is built on the same library.

Also: the SDK depends on http-sfv, which its author has deprecated in favor of http-sf.

Suggested fix

AdCP adds domain knowledge: which origin is the identity, revocation, bindings, and grants. The transport protocol belongs to the library, and a missing feature goes upstream as a PR.

  1. Send the key/req fix upstream for feat: add no-auth test agent helpers #29, and build signing and verification on http-message-signatures. Keep only the AdCP layer: directory fetch and cache, Signature-Agent handling, replay, and the profile checks.
  2. Move from http-sfv to http-sf, or drop it if the library covers parsing.
  3. Remove _base, _structured_fields.py, and the hand-written directory signature checks.

Smaller items (unchanged from the earlier list)

  • DeprecationWarning on every legacy construction while 3.3 is not advertised (autosign.py:136-141, signed_requests.py:280-286).
  • cast(WbaSignerKeyResolver, ...) turns a resolver without signer_origin into a permanent 503 (signed_requests.py:274, :666; wba.py:741-743).
  • History quotas key on registrable_domain with PSL PRIVATE included (wba.py:902-907, etld.py:184), so one hosting provider's tenants can fill the 256-owner pool. Go groups them under the suffix.
  • adcp.signing grew from 177 to 207 public names and is not in the API snapshot (Pin the adcp.reporting.ledger public API before 9.0.0 GA #1490).

The 503 for an identity with no revocation list, the layering, and the nonce are in the correction on #1502.

Activity

  1. added
    enhancement
    python
    on Oct 15, 2026
  2. changed the title [-]Identity follow-ups from #1502 not covered by the outage correction[/-] [+]Build Web Bot Auth on `http-message-signatures` instead of a hand-written RFC 9421 layer[/+] on Oct 15, 2026
  3. added
    sdk-10
    on Oct 26, 2026
  4. bokelley commented on Oct 26, 2026

    @bokelley
    Contributor

    Closing: everything here has landed on next.

    The pinned PSL snapshot continues in #1562. Tracking: #1648.

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

    enhancementpythonsdk-10

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions