web bot auth & aipref gate
Why this matters
Publishers currently guess crawler identity from spoofable User-Agent strings and fragile IP allowlists while managing four overlapping preference formats (robots.txt, IETF aipref Content-Usage, Content-Signal, and RSL 1.0) that frequently contradict one another with no shared conflict rule.
What this opens up
Cryptographic crawler identity paired with explicit per-purpose access control: sites can allow verified real-time ai-input RAG grounding while blocking bulk train-ai crawls, stop replayed signatures with an atomic SQLite nonce window, or gate licensed access behind RSL 1.0 tokens.
How the tests work
- Click Sign & Fetch Allowed RAG (200) to sign a live HTTP request in your browser with an Ed25519 key enrolled in
/.well-known/http-message-signatures-directory. - Click Replay Captured Nonce (409) to re-send the exact captured signature and watch the
ReplayGuardSQLite Durable Object block the duplicate nonce. - Run Run All 5 Attacks to verify that replayed nonces (
409), tampered paths (401), unlisted rogue keys (403), expired timestamps (401), and disallowedtrain-aipurposes (403) all fail closed. - Toggle
robots.txt,Content-Usage,Content-Signal, andRSL 1.0rules in the Policy Conflict Matrix Editor and switch between the three precedence modes to see how contradictions resolve.
Hypothesis
Request-side RFC 9421 Ed25519
Signature-Agentverification backed by an atomic Durable Object replay ledger (ReplayGuard) authenticates automated crawlers without static IP lists, while explicit precedence rules are required to resolve contradictoryrobots.txt,Content-Usage,Content-Signal, and RSL 1.0 signals deterministically.
What confirms it: Enrolled browser Ed25519 keys pass /protected/article for ai-input (200), all 5 red-team attacks fail closed (409, 401, 403, 401, 403), and the Policy Conflict Matrix flags pairwise contradictions across restrictive-intersection, specific-overrides-robots, and license-aware modes.
What bounds or disproves it: Without a stateful nonce store (ReplayGuard), a captured valid RFC 9421 signature replays freely until expiry, and publishing conflicting robots.txt, Content-Usage, Content-Signal, and RSL 1.0 rules produces opposite crawl outcomes depending on which precedence rule a crawler picks.
Under the hood
Web Bot Auth & aipref Gate (GitHub) tests the request-side half of IETF Web Bot Auth alongside IETF AI Preferences (aipref):
- Request-Side RFC 9421 Ed25519 Signing &
ReplayGuardDO — Generates an Ed25519 keypair in browser RAM via WebCrypto, enrolls only the public JWK in/.well-known/http-message-signatures-directory(persisted in SQLiteReplayGuard), signs requests over("@authority" "signature-agent" "@method" "@target-uri"), and enforces an atomic sliding replay window in SQLite (sig_nonces). - 5 Live Red-Team Attacks — Runs replay (
409 REPLAY_DETECTED), tampered authority/path (401 SIG_INVALID), unlisted rogue directory (403 KEY_UNTRUSTED), expired timestamp (401 SIG_EXPIRED), and disallowed purpose (403 AIPREF_DENIED) live against/protected/article,/protected/ai-dataset, and/protected/robots-disallowed. - Policy Conflict Matrix — Shares
public/lib/policy-matrix.jsbetween browser and edge to evaluate RFC 9309robots.txt, IETFContent-Usage,Content-Signal, and RSL 1.0 (/rsl.jsonJSON and XML) acrossrestrictive-intersection,specific-overrides-robots, andlicense-awareprecedence modes.
Key terms & further reading
- IETF Web Bot Auth ↗
- An IETF working group standardizing cryptographic crawler authentication using RFC 9421 request signatures and
Signature-Agentdirectories. - IETF AI Preferences (aipref / Content-Usage) ↗
- A standardized HTTP header vocabulary letting publishers set distinct usage rules for
search,ai-input(RAG), andtrain-ai. - RFC 9421 HTTP Message Signatures ↗
- The HTTP signature specification binding
@authority,signature-agent,@method,@target-uri, expiry, and a uniquenonceto an Ed25519 signature. - RFC 9309 robots.txt ↗
- The Robots Exclusion Protocol defining path-level allow and disallow directives for automated crawlers.
- RSL 1.0 (Really Simple Licensing) ↗
- A machine-readable licensing specification for declaring free, attribution-only, or pay-per-crawl terms alongside preference headers.
- Ed25519 & Sliding Replay Window ↗
- A fast public-key signature algorithm paired with a Durable Object SQLite nonce table so captured valid signatures cannot be replayed.
Open questions
- How should edge caches handle signed
Signature-Agentrequests without collapsing CDN hit rates on public articles? - Which conflict precedence rule (
restrictive-intersectionvs.license-aware) will dominate whenContent-Usageand RSL 1.0 disagree?
Iteration log
- — Deployed Cloudflare Worker + SQLite
ReplayGuardDurable Object hosting RFC 9421 self-signed/.well-known/http-message-signatures-directory, unlisted rogue directory fixture, WebCrypto Ed25519 browser signing workbench, 5 live red-team attacks, and liverobots.txt/ IETFaipref(Content-Usage) /Content-Signal/ RSL 1.0 conflict matrix.
Primitives tested: RFC 9421 HTTP Message Signatures (Signature-Agent), WebCrypto Ed25519, IETF aipref (Content-Usage), Content-Signal, RSL 1.0, RFC 9309 robots.txt, Durable Object SQLite (ReplayGuard).
This is an active lab under /labs/ and stays off the main RSS feed until graduated into a full essay.