Verified Standards & ProtocolsAccess ControlsPlatform & Ecosystem Web Bot Auth (spec repo) ·

Cloudflare Web Bot Auth Caddy Plugin Patches Multi-Header Signature Handling and Documents Upstream Parsing Bug

Open source ↗

Summary

Cloudflare updated its Web Bot Auth Caddy example plugin to handle multi-line HTTP signatures and work around upstream limitations in the Go HTTP message signature library. The update combines split Signature and Signature-Input field lines in place before validation, ensuring requests containing multiple signatures are not dropped. It also documents and adds test coverage for an upstream bug where dictionary members of the Signature-Agent header fail signature verification under draft-ietf-webbotauth-httpsig-protocol-00.

Key facts

  • The Caddy plugin’s Validate function now merges multi-line Signature-Input and Signature headers into single lines before verification to comply with RFC 9110 Section 5.3.
  • Upstream library httpsig-go v1.2.2 only reads the first line of Signature-Input and Signature fields (remitly-oss/httpsig-go#18), causing verification to fail with ‘The signature for label ‘sig2’ not found’ when signatures were spread across separate lines.
  • Under draft-ietf-webbotauth-httpsig-protocol-00 Section 5.2.1, signatures must cover the Signature-Agent member keyed to their label, but httpsig-go v1.2.2 ignores the key parameter and signs the entire field, causing 401 rejections for dictionary Signature-Agent headers.
  • Cloudflare pinned httpsig-go v1.2.2 while adding a README ‘Known Limitations’ section and introducing a regression test designed to fail automatically once an updated dependency without the upstream fix is installed.
  • The hand-built signature base was verified against ed25519 test vectors in packages/web-bot-auth/test/test_data/web_bot_auth_architecture_v2.json.

Insight

Edge bot verification implementations often stumble on header-folding and component-identifier edge cases in general-purpose RFC 9421 libraries, necessitating pre-normalization workarounds until upstream cryptographic parsers mature.

Implication

Developers deploying HTTP message signature verification at the reverse-proxy layer must normalize multi-line headers and account for parser discrepancies in dictionary-structured headers to avoid erroneously blocking legitimate signed crawlers.

Why it matters

Cryptographic crawler authentication relies on absolute bit-level parity across heterogeneous libraries; small discrepancies in header parsing or component base construction result in immediate 401 Unauthorized rejections for valid bots.

Evidence