You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Interop run: 8 Web Bot Auth request fixtures vs 0.6.0 — 6 match Cloudflare's verdicts, 2 differ by (spec-permitted) policy #2
Hi, thanks for regent-httpsig. The README's interop notes were what made me try it.
I ran a small set of externally generated Web Bot Auth request fixtures against 0.6.0 (source 36c3cfc, http-message-signatures 2.0.1). Each case runs at its own fixture clock, and the directory is served in memory, so no network is involved. The same fixtures give 8 of 8 expected verdicts on Cloudflare's web-bot-auth 0.2.0.
Neither difference breaks the drafts, as far as I can tell. They may still be worth a line in the docs:
Expiry grace.HTTPMessageVerifier.max_clock_skew (5 s) is applied to expires too, so an expired signature still verifies for 5 s after expires. At +6 s it is denied. The README's check table says "expired signature rejected", so a note on the 5 s tolerance (or a config knob) would make the behaviour explicit.
Replay. The nonce is covered by the signature, but nothing checks it for uniqueness. draft-meunier-web-bot-auth-architecture-05 leaves enforcement to the origin (§4.4, §5.3: "it is the origin's responsibility to enforce it"). The "Security model" section might mention that callers who want anti-replay need their own (keyid, nonce) store until expires.
Reproduction (fixtures are CC0, harness MIT; the key is the public RFC 9421 B.1.4 test key):
Thank you for the run, and sorry it sat here for two months without an answer.
You read both points correctly, and 0.8.0 changes both of them:
Expiry grace. The upstream verifier's 5 second clock skew was being applied to expires too. From 0.8.0 there is no grace on expires on either path: a signature checked at or after expires is refused. created may still be at most 5 seconds ahead of the verifier's clock. Your "expired, checked 1 s after expires" case is now denied.
Replay. The nonce is covered but was never checked for uniqueness, and nothing else stopped a replay. 0.8.0 adds an opt-in replay guard (HttpsigVerifier(..., replay_guard=InMemoryReplayGuard())). With a guard, a signature is admitted only within an admission window after created (replay_window_seconds, 300 s by default) and a second presentation inside that window is refused. It keys on the signature base, not on the Signature bytes, because an ECDSA signature has a second valid encoding. The guard is partitioned by the host that vouches for the key, with a cap on one host's share, so one signer cannot fill it and lock out others. Without a guard nothing changes, and the README now says plainly that a valid signature can be replayed until it expires unless the origin adds a guard or makes the action idempotent. The in-memory guard is per process; a deployment with several processes plugs in its own store through the one-method ReplayGuard protocol.
0.8.0 also moves the Web Bot Auth path to draft-ietf-webbotauth-httpsig-protocol-01: @authority (or @target-uri) and the Signature-Agent member must be covered, expires is required, and a signature is attributed only to the member it covers. The legacy sf-string Signature-Agent is still accepted.
We took you up on the offer: your eight fixtures (CC0) now run in CI as tests/test_web_bot_auth.py::test_issue2_fixtures, with the replay case under a guard in tests/test_replay.py, and the README's check table links back here. With 0.8.0 all eight give the expected verdict.
Activity
0.8.0: Web Bot Auth draft-ietf-webbotauth-httpsig-protocol-01, server…
abay94 commentedon Dec 3, 2026
regent-httpsig 0.8.0 is out: https://pypi.org/project/regent-httpsig/0.8.0/ (release notes: https://github.com/regent-protocol/regent-httpsig/releases/tag/v0.8.0).
Thank you for the run, and sorry it sat here for two months without an answer.
You read both points correctly, and 0.8.0 changes both of them:
Expiry grace. The upstream verifier's 5 second clock skew was being applied to
expirestoo. From 0.8.0 there is no grace onexpireson either path: a signature checked at or afterexpiresis refused.createdmay still be at most 5 seconds ahead of the verifier's clock. Your "expired, checked 1 s afterexpires" case is now denied.Replay. The nonce is covered but was never checked for uniqueness, and nothing else stopped a replay. 0.8.0 adds an opt-in replay guard (
HttpsigVerifier(..., replay_guard=InMemoryReplayGuard())). With a guard, a signature is admitted only within an admission window aftercreated(replay_window_seconds, 300 s by default) and a second presentation inside that window is refused. It keys on the signature base, not on theSignaturebytes, because an ECDSA signature has a second valid encoding. The guard is partitioned by the host that vouches for the key, with a cap on one host's share, so one signer cannot fill it and lock out others. Without a guard nothing changes, and the README now says plainly that a valid signature can be replayed until it expires unless the origin adds a guard or makes the action idempotent. The in-memory guard is per process; a deployment with several processes plugs in its own store through the one-methodReplayGuardprotocol.0.8.0 also moves the Web Bot Auth path to draft-ietf-webbotauth-httpsig-protocol-01:
@authority(or@target-uri) and theSignature-Agentmember must be covered,expiresis required, and a signature is attributed only to the member it covers. The legacy sf-stringSignature-Agentis still accepted.We took you up on the offer: your eight fixtures (CC0) now run in CI as
tests/test_web_bot_auth.py::test_issue2_fixtures, with the replay case under a guard intests/test_replay.py, and the README's check table links back here. With 0.8.0 all eight give the expected verdict.Changelog: https://github.com/regent-protocol/regent-httpsig/blob/main/CHANGELOG.md
Closing this; reopen if anything still reads differently to you.