web-bot-auth is a TypeScript library developed by Cloudflare Research that implements HTTP Message Signatures for the purpose of Web Bot Authentication. It adheres to the draft-meunier-web-bot-auth-architecture specification. Currently at version 0.1.3, the library provides utilities for signing and verifying HTTP requests using cryptographic keys, including features like JWK (JSON Web Key) thumbprint pre-computation. Its release cadence is likely tied to research advancements and RFC progression, as it's an early-stage project. Key differentiators include its specific focus on bot authentication, direct implementation of a draft RFC, and shipping with full TypeScript type definitions, making it suitable for type-safe applications. It is designed to work with standard Web API `Request` objects.
npm install web-bot-authVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to sign an HTTP request using a test JWK, adding 'Signature' and 'Signature-Input' headers for Web Bot Authentication.
Do not use in production without a thorough security audit. Closely monitor for updates and security advisories.
Pin your dependency to an exact version and review release notes thoroughly for any updates. Be prepared for refactoring when upgrading.
Ensure `Request` and `Response` are globally available (e.g., using `node-fetch` or a web framework that provides them) or explicitly import them if your environment supports it.
Change your import statement from `import { signerFromJWK } from 'web-bot-auth';` to `import { signerFromJWK } from 'web-bot-auth/crypto';`.Install a polyfill like `node-fetch` and ensure `Request` is made globally available, or manually import it if your environment permits. For example: `import { Request } from 'node-fetch';`Ensure your JWK includes a unique 'kid' property and that the signing process correctly includes this 'keyid' in the 'Signature-Input' headers.
No dependency data recorded yet.