From 1814a50f21b6f6db3804bd65549e3df2b4f6e1f3 Mon Sep 17 00:00:00 2001 From: Akshat Mahajan Date: Thu, 5 Nov 2026 17:59:24 -0500 Subject: [PATCH 1/5] feat(docs): Expand the new CONTRIBUTING.md guidelines We have received a number of external PR requests, and this expansion is a band-aid patch to ensure all resources evolve in a coordinated manner. The main goal is to (a) assist in triaging, (b) identifying how both libraries should co-evolve, and (c) make explicit some guidelines for what a valid contribution is. This change will require contributors to submit issues before opening PRs. It sets a standard for how we will entertain interop issues between the two libraries. It defines the minimum criteria for how we want to interact with AI contributions, as well as what criteria an author should gauge their contribution against. --- .github/ISSUE_TEMPLATE/bug_report.md | 66 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 10 ++++ .github/ISSUE_TEMPLATE/feature_request.md | 49 +++++++++++++++++ .github/ISSUE_TEMPLATE/question.md | 22 ++++++++ CONTRIBUTING.md | 31 +++++++++++ package-lock.json | 26 --------- 6 files changed, 178 insertions(+), 26 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/question.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..71ecf76 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,66 @@ +--- +name: Bug report +about: >- + The libraries do not implement the specification faithfully, provided + examples do not work, or a vulnerability is present. +title: "[bug]: " +labels: ["bug"] +--- + +## Summary + +A clear and concise description of the bug. + +## Issue type + +Which of the accepted bug forms does this fall under? (See [CONTRIBUTING.md](https://github.com/cloudflare/web-bot-auth/blob/main/CONTRIBUTING.md)) + +- [ ] A library does not implement the Web Bot Auth specification faithfully +- [ ] A provided example does not work +- [ ] A vulnerability is present + +## Affected library + +- [ ] Rust crate `web-bot-auth` +- [ ] Rust crate `http-signature-directory` +- [ ] TypeScript package `web-bot-auth` +- [ ] TypeScript package `http-message-sig` +- [ ] TypeScript package `jsonwebkey-thumbprint` +- [ ] An example under [`examples/`](https://github.com/cloudflare/web-bot-auth/tree/main/examples) +- [ ] Not sure + +## Environment + +- Crate/package version: +- Toolchain (e.g. output of `rustc --version`, Node.js version): +- Runtime: native / Cloudflare Workers / other (please specify): +- Link to affected code or repository: + +## Reproduction + +Minimal steps to reproduce the behaviour. A failing test or a small code snippet is best. + +1. +2. +3. + +**Expected behaviour:** what should happen according to the specification? + +**Actual behaviour:** what happens instead? + +If a vulnerability is present, please include a proof of concept, but avoid posting exploitable details beyond what is needed to reproduce the issue. + +## Test output + +For Rust crates, please paste the output of: + +```bash +cargo +stable test --workspace --all-features --all-targets +``` + +If the bug involves the Cloudflare Workers runtime (for example, new dependencies), please note whether it reproduces when running the [signature-agent-card-and-registry example](https://github.com/cloudflare/web-bot-auth/tree/main/examples/signature-agent-card-and-registry), as incompatibilities can surface only at runtime. + +## Checklist + +- [ ] I have read [CONTRIBUTING.md](https://github.com/cloudflare/web-bot-auth/blob/main/CONTRIBUTING.md) and confirmed this is an accepted issue form. +- [ ] This is not an interop issue. (Interop issues - where the Rust and TypeScript libraries differ in their behaviour, but do not violate the Web Bot Auth specification - are filed as feature requests separately for each library, stating the final goal.) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..4f227bc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,10 @@ +blank_issues_enabled: false +contact_links: + - name: Contributing guidelines + url: https://github.com/cloudflare/web-bot-auth/blob/main/CONTRIBUTING.md + about: >- + Please read before opening an issue. Only bug reports, feature requests + and questions are accepted. For interop issues (where the Rust and + TypeScript libraries differ in their behaviour, but do not violate the + Web Bot Auth specification), please open a feature request separately + for each library, stating the final goal. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..72a892e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,49 @@ +--- +name: Feature request +about: >- + A new feature to support against any library. New API methods, convenience + features, or new algorithms belong here. +title: "[feature]: " +labels: ["enhancement"] +--- + +## Problem to solve + +What are you trying to achieve? A clear description of the problem or gap this feature addresses. + +## Affected library + +Feature requests target one library at a time. This includes interop issues - where the Rust and TypeScript libraries differ in their behaviour, but do not violate the Web Bot Auth specification - which are filed as one feature request per library, each stating the final goal. + +- [ ] Rust crate `web-bot-auth` +- [ ] Rust crate `http-signature-directory` +- [ ] TypeScript package `web-bot-auth` +- [ ] TypeScript package `http-message-sig` +- [ ] TypeScript package `jsonwebkey-thumbprint` + +## Proposed solution + +Describe the feature: new API methods (a sketch of the proposed signature is helpful), convenience features, or new algorithms. + +```rust +// Proposed API sketch (Rust or TypeScript) +``` + +## Relation to the specification + +- [ ] This feature is covered by an existing specification (please link the relevant section). +- [ ] This feature extends beyond the Web Bot Auth / HTTP Message Signatures specifications. +- [ ] This feature would require a specification change. + +## Alternatives considered + +Any alternative solutions or workarounds you have considered. + +## Additional context + +Links to related issues, upstream discussions, or prior art. + +## Checklist + +- [ ] I have read [CONTRIBUTING.md](https://github.com/cloudflare/web-bot-auth/blob/main/CONTRIBUTING.md) and confirmed this is an accepted issue form. +- [ ] If this is an interop issue (the Rust and TypeScript libraries differ in their behaviour, but do not violate the Web Bot Auth specification), I understand a separate feature request must be opened for each library, each stating the final goal. diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 0000000..d02d624 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,22 @@ +--- +name: Question +about: Clarification on operations or best path forward +title: "[question]: " +labels: ["question"] +--- + +## What would you like to know? + +A clear and concise question, for example clarification on operations or the best path forward. + +## Context + +- Library or libraries involved: +- What are you trying to do? +- Documentation or specification sections you have already consulted: +- Anything else relevant (code snippet, versions, environment): + +## Checklist + +- [ ] I have read [CONTRIBUTING.md](https://github.com/cloudflare/web-bot-auth/blob/main/CONTRIBUTING.md). +- [ ] If this turns out to be a bug or a feature request, I understand maintainers may ask me to re-open it with the matching template. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f91ce91..f5c9ab5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,6 +3,33 @@ Welcome to web-bot-auth's contributor guidelines. Please take a look. This should help you get ready to contribute to this repo. +## How to contribute + +Before opening a PR, please raise an issue on the main repository and +confirm the change is one we'll accept. + +We accept the following forms of issues: + +1. _Bug report_: The libraries provided here do not implement the specification faithfully, provided examples do not work, or a vulnerability is present. +2. _Feature request_: A new feature to support against any library. New API methods, convenience features, or new behaviour belongs here. +3. _Questions_: Clarification on operations or best path forward. + +For interop issues - where the Rust and Typescript libraries differ in their behaviour, but do not violate the Web Bot Auth specification - +please open a feature request separately for each library, stating the final goal. + +## Principles for contributions + +0. For bug reports, we aim to support the most recent specifications of: + + - The [Web Bot Auth protocol](https://datatracker.ietf.org/doc/draft-ietf-webbotauth-httpsig-protocol/) + - The [registry and signature agent card](https://www.ietf.org/archive/id/draft-meunier-webbotauth-registry-04.html) + +1. Verifiers require paths for graceful migration, while signers don't. Changes in verification logic, such as what is considered a valid + signed message, should use feature gates, deperecation warnings, or similar and outline a stable deprecation path. A method may be removed + if it has been deprecated for at least two minor versions before 1.0, and one major version after 1.0. +2. We support WASM as a compilation target for Rust. Your changes should be tested to work on `wasm32-unknown-unknown` in addiion to local environments. +3. AI-generated pull requests are accepted, but, where possible, use your own voice to describe the issue and your plan. + ## Testing Crates in this repo provide Rust tests. @@ -55,3 +82,7 @@ use serde::Serialize; use std::time::Duration; use std::collections::HashMap; ``` + +## Releases + +Releases are currently on an ad-hoc basis. To request a release, please ping either @AkshatM or @thibmeu. diff --git a/package-lock.json b/package-lock.json index 81d2de2..695ddd0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -230,7 +230,6 @@ "os": [ "aix" ], - "peer": true, "engines": { "node": ">=18" } @@ -248,7 +247,6 @@ "os": [ "android" ], - "peer": true, "engines": { "node": ">=18" } @@ -266,7 +264,6 @@ "os": [ "android" ], - "peer": true, "engines": { "node": ">=18" } @@ -284,7 +281,6 @@ "os": [ "android" ], - "peer": true, "engines": { "node": ">=18" } @@ -302,7 +298,6 @@ "os": [ "darwin" ], - "peer": true, "engines": { "node": ">=18" } @@ -320,7 +315,6 @@ "os": [ "darwin" ], - "peer": true, "engines": { "node": ">=18" } @@ -338,7 +332,6 @@ "os": [ "freebsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -356,7 +349,6 @@ "os": [ "freebsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -374,7 +366,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -392,7 +383,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -410,7 +400,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -428,7 +417,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -446,7 +434,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -464,7 +451,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -482,7 +468,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -500,7 +485,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -518,7 +502,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -536,7 +519,6 @@ "os": [ "netbsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -554,7 +536,6 @@ "os": [ "netbsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -572,7 +553,6 @@ "os": [ "openbsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -590,7 +570,6 @@ "os": [ "openbsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -608,7 +587,6 @@ "os": [ "openharmony" ], - "peer": true, "engines": { "node": ">=18" } @@ -626,7 +604,6 @@ "os": [ "sunos" ], - "peer": true, "engines": { "node": ">=18" } @@ -644,7 +621,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=18" } @@ -662,7 +638,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=18" } @@ -680,7 +655,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=18" } From d14b6476d9ff7d42a934da466519cfe01ecd0ccd Mon Sep 17 00:00:00 2001 From: Akshat Mahajan <6730980+AkshatM@users.noreply.github.com> Date: Thu, 5 Nov 2026 19:32:47 -0500 Subject: [PATCH 2/5] Update CONTRIBUTING.md Co-authored-by: clanky-the-clanker[bot] <342202840+clanky-the-clanker[bot]@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f5c9ab5..7791187 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,7 @@ please open a feature request separately for each library, stating the final goa - The [registry and signature agent card](https://www.ietf.org/archive/id/draft-meunier-webbotauth-registry-04.html) 1. Verifiers require paths for graceful migration, while signers don't. Changes in verification logic, such as what is considered a valid - signed message, should use feature gates, deperecation warnings, or similar and outline a stable deprecation path. A method may be removed + signed message, should use feature gates, deprecation warnings, or similar and outline a stable deprecation path. A method may be removed if it has been deprecated for at least two minor versions before 1.0, and one major version after 1.0. 2. We support WASM as a compilation target for Rust. Your changes should be tested to work on `wasm32-unknown-unknown` in addiion to local environments. 3. AI-generated pull requests are accepted, but, where possible, use your own voice to describe the issue and your plan. From 9faf22dd172761a239c1717e5661fff38a443241 Mon Sep 17 00:00:00 2001 From: Akshat Mahajan <6730980+AkshatM@users.noreply.github.com> Date: Thu, 5 Nov 2026 19:32:57 -0500 Subject: [PATCH 3/5] Update CONTRIBUTING.md Co-authored-by: clanky-the-clanker[bot] <342202840+clanky-the-clanker[bot]@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7791187..763b50e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,7 +27,7 @@ please open a feature request separately for each library, stating the final goa 1. Verifiers require paths for graceful migration, while signers don't. Changes in verification logic, such as what is considered a valid signed message, should use feature gates, deprecation warnings, or similar and outline a stable deprecation path. A method may be removed if it has been deprecated for at least two minor versions before 1.0, and one major version after 1.0. -2. We support WASM as a compilation target for Rust. Your changes should be tested to work on `wasm32-unknown-unknown` in addiion to local environments. +2. We support WASM as a compilation target for Rust. Your changes should be tested to work on `wasm32-unknown-unknown` in addition to local environments. 3. AI-generated pull requests are accepted, but, where possible, use your own voice to describe the issue and your plan. ## Testing From cf87030c0d77e0fa082a9d41ba2459436d846bfc Mon Sep 17 00:00:00 2001 From: Akshat Mahajan <6730980+AkshatM@users.noreply.github.com> Date: Fri, 6 Nov 2026 10:08:11 -0500 Subject: [PATCH 4/5] Apply batched suggestions from code review Co-authored-by: Thibault --- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- CONTRIBUTING.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 71ecf76..95e486f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -15,11 +15,11 @@ A clear and concise description of the bug. Which of the accepted bug forms does this fall under? (See [CONTRIBUTING.md](https://github.com/cloudflare/web-bot-auth/blob/main/CONTRIBUTING.md)) -- [ ] A library does not implement the Web Bot Auth specification faithfully +- [ ] A library does not implement the [Web Bot Auth specification](https://datatracker.ietf.org/doc/draft-ietf-webbotauth-httpsig-protocol/) faithfully - [ ] A provided example does not work - [ ] A vulnerability is present -## Affected library +## Affected component - [ ] Rust crate `web-bot-auth` - [ ] Rust crate `http-signature-directory` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 763b50e..bf308e1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,13 +22,13 @@ please open a feature request separately for each library, stating the final goa 0. For bug reports, we aim to support the most recent specifications of: - The [Web Bot Auth protocol](https://datatracker.ietf.org/doc/draft-ietf-webbotauth-httpsig-protocol/) - - The [registry and signature agent card](https://www.ietf.org/archive/id/draft-meunier-webbotauth-registry-04.html) + - The [registry and signature agent card](https://datatracker.ietf.org/doc/draft-meunier-webbotauth-registry/) 1. Verifiers require paths for graceful migration, while signers don't. Changes in verification logic, such as what is considered a valid signed message, should use feature gates, deprecation warnings, or similar and outline a stable deprecation path. A method may be removed if it has been deprecated for at least two minor versions before 1.0, and one major version after 1.0. 2. We support WASM as a compilation target for Rust. Your changes should be tested to work on `wasm32-unknown-unknown` in addition to local environments. -3. AI-generated pull requests are accepted, but, where possible, use your own voice to describe the issue and your plan. +3. AI-generated pull requests are accepted, but, where possible, use your own voice to describe the issue and your plan. Avoid long description and text and go directly to the core of the work. ## Testing From ec92fcec3ce11b8c0e5d9acfafec1bbe1df81039 Mon Sep 17 00:00:00 2001 From: Thibault Meunier Date: Wed, 25 Nov 2026 09:42:00 +0100 Subject: [PATCH 5/5] docs: streamline contribution and disclosure guidance Route security reports to private advisories and scope triage, rollout, and WASM guidance. Drop unrelated lockfile changes from the PR. --- .github/ISSUE_TEMPLATE/bug_report.md | 39 +++-------------------- .github/ISSUE_TEMPLATE/config.yml | 10 +++--- .github/ISSUE_TEMPLATE/feature_request.md | 17 ++-------- .github/ISSUE_TEMPLATE/question.md | 5 --- CONTRIBUTING.md | 32 ++++++++----------- package-lock.json | 26 +++++++++++++++ 6 files changed, 51 insertions(+), 78 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 95e486f..8ccee34 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,23 +1,11 @@ --- name: Bug report -about: >- - The libraries do not implement the specification faithfully, provided - examples do not work, or a vulnerability is present. +about: Report a defect in a library, release, or example. title: "[bug]: " labels: ["bug"] --- -## Summary - -A clear and concise description of the bug. - -## Issue type - -Which of the accepted bug forms does this fall under? (See [CONTRIBUTING.md](https://github.com/cloudflare/web-bot-auth/blob/main/CONTRIBUTING.md)) - -- [ ] A library does not implement the [Web Bot Auth specification](https://datatracker.ietf.org/doc/draft-ietf-webbotauth-httpsig-protocol/) faithfully -- [ ] A provided example does not work -- [ ] A vulnerability is present +Report suspected vulnerabilities [privately](https://github.com/cloudflare/web-bot-auth/security/advisories/new). Do not post security details here. ## Affected component @@ -27,7 +15,7 @@ Which of the accepted bug forms does this fall under? (See [CONTRIBUTING.md](htt - [ ] TypeScript package `http-message-sig` - [ ] TypeScript package `jsonwebkey-thumbprint` - [ ] An example under [`examples/`](https://github.com/cloudflare/web-bot-auth/tree/main/examples) -- [ ] Not sure +- [ ] Other or not sure ## Environment @@ -44,23 +32,6 @@ Minimal steps to reproduce the behaviour. A failing test or a small code snippet 2. 3. -**Expected behaviour:** what should happen according to the specification? - -**Actual behaviour:** what happens instead? - -If a vulnerability is present, please include a proof of concept, but avoid posting exploitable details beyond what is needed to reproduce the issue. - -## Test output - -For Rust crates, please paste the output of: - -```bash -cargo +stable test --workspace --all-features --all-targets -``` - -If the bug involves the Cloudflare Workers runtime (for example, new dependencies), please note whether it reproduces when running the [signature-agent-card-and-registry example](https://github.com/cloudflare/web-bot-auth/tree/main/examples/signature-agent-card-and-registry), as incompatibilities can surface only at runtime. - -## Checklist +**Expected behaviour:** what should happen? Link to the relevant specification section if applicable. -- [ ] I have read [CONTRIBUTING.md](https://github.com/cloudflare/web-bot-auth/blob/main/CONTRIBUTING.md) and confirmed this is an accepted issue form. -- [ ] This is not an interop issue. (Interop issues - where the Rust and TypeScript libraries differ in their behaviour, but do not violate the Web Bot Auth specification - are filed as feature requests separately for each library, stating the final goal.) +**Actual behaviour:** what happens instead? Include relevant error or test output. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 4f227bc..e5b4280 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,10 +1,8 @@ blank_issues_enabled: false contact_links: + - name: Report a vulnerability privately + url: https://github.com/cloudflare/web-bot-auth/security/advisories/new + about: Do not post suspected vulnerabilities in public issues or pull requests. - name: Contributing guidelines url: https://github.com/cloudflare/web-bot-auth/blob/main/CONTRIBUTING.md - about: >- - Please read before opening an issue. Only bug reports, feature requests - and questions are accepted. For interop issues (where the Rust and - TypeScript libraries differ in their behaviour, but do not violate the - Web Bot Auth specification), please open a feature request separately - for each library, stating the final goal. + about: Read the contribution and testing guidelines. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 72a892e..664d42f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,8 +1,6 @@ --- name: Feature request -about: >- - A new feature to support against any library. New API methods, convenience - features, or new algorithms belong here. +about: Suggest a new feature or improvement. title: "[feature]: " labels: ["enhancement"] --- @@ -11,9 +9,9 @@ labels: ["enhancement"] What are you trying to achieve? A clear description of the problem or gap this feature addresses. -## Affected library +## Affected libraries -Feature requests target one library at a time. This includes interop issues - where the Rust and TypeScript libraries differ in their behaviour, but do not violate the Web Bot Auth specification - which are filed as one feature request per library, each stating the final goal. +For interoperability requests, describe the desired behavior in both libraries. - [ ] Rust crate `web-bot-auth` - [ ] Rust crate `http-signature-directory` @@ -25,10 +23,6 @@ Feature requests target one library at a time. This includes interop issues - wh Describe the feature: new API methods (a sketch of the proposed signature is helpful), convenience features, or new algorithms. -```rust -// Proposed API sketch (Rust or TypeScript) -``` - ## Relation to the specification - [ ] This feature is covered by an existing specification (please link the relevant section). @@ -42,8 +36,3 @@ Any alternative solutions or workarounds you have considered. ## Additional context Links to related issues, upstream discussions, or prior art. - -## Checklist - -- [ ] I have read [CONTRIBUTING.md](https://github.com/cloudflare/web-bot-auth/blob/main/CONTRIBUTING.md) and confirmed this is an accepted issue form. -- [ ] If this is an interop issue (the Rust and TypeScript libraries differ in their behaviour, but do not violate the Web Bot Auth specification), I understand a separate feature request must be opened for each library, each stating the final goal. diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index d02d624..42c2bc2 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -15,8 +15,3 @@ A clear and concise question, for example clarification on operations or the bes - What are you trying to do? - Documentation or specification sections you have already consulted: - Anything else relevant (code snippet, versions, environment): - -## Checklist - -- [ ] I have read [CONTRIBUTING.md](https://github.com/cloudflare/web-bot-auth/blob/main/CONTRIBUTING.md). -- [ ] If this turns out to be a bug or a feature request, I understand maintainers may ask me to re-open it with the matching template. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bf308e1..650ea79 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,30 +5,18 @@ This should help you get ready to contribute to this repo. ## How to contribute -Before opening a PR, please raise an issue on the main repository and -confirm the change is one we'll accept. +Discuss substantial or breaking changes in an issue before opening a PR. Small fixes can go straight to a PR. If an issue already exists, use it. -We accept the following forms of issues: +Use the issue templates for bugs, feature requests, and questions. Report suspected vulnerabilities [privately](https://github.com/cloudflare/web-bot-auth/security/advisories/new), not in public issues or PRs. -1. _Bug report_: The libraries provided here do not implement the specification faithfully, provided examples do not work, or a vulnerability is present. -2. _Feature request_: A new feature to support against any library. New API methods, convenience features, or new behaviour belongs here. -3. _Questions_: Clarification on operations or best path forward. - -For interop issues - where the Rust and Typescript libraries differ in their behaviour, but do not violate the Web Bot Auth specification - -please open a feature request separately for each library, stating the final goal. +For Rust and TypeScript interoperability issues, open one issue describing the desired behavior in both libraries. Split follow-up work only if it needs separate tracking. ## Principles for contributions -0. For bug reports, we aim to support the most recent specifications of: - - - The [Web Bot Auth protocol](https://datatracker.ietf.org/doc/draft-ietf-webbotauth-httpsig-protocol/) - - The [registry and signature agent card](https://datatracker.ietf.org/doc/draft-meunier-webbotauth-registry/) - -1. Verifiers require paths for graceful migration, while signers don't. Changes in verification logic, such as what is considered a valid - signed message, should use feature gates, deprecation warnings, or similar and outline a stable deprecation path. A method may be removed - if it has been deprecated for at least two minor versions before 1.0, and one major version after 1.0. -2. We support WASM as a compilation target for Rust. Your changes should be tested to work on `wasm32-unknown-unknown` in addition to local environments. -3. AI-generated pull requests are accepted, but, where possible, use your own voice to describe the issue and your plan. Avoid long description and text and go directly to the core of the work. +- Use the current [Web Bot Auth protocol](https://datatracker.ietf.org/doc/draft-ietf-webbotauth-httpsig-protocol/) and [registry and Signature Agent Card](https://datatracker.ietf.org/doc/draft-meunier-webbotauth-registry/) drafts as conformance references. +- If a signing or verification change affects compatibility with deployed peers, describe how users should roll it out. If security or spec compliance requires an immediate break, explain why and what users need to change. +- Keep deprecated public APIs for at least two minor releases before 1.0 and at least one major version from 1.0 onward. +- AI-assisted PRs are welcome. Explain the problem and your plan briefly, in your own words. ## Testing @@ -39,6 +27,12 @@ You can run these manually using: cargo +stable test --workspace --all-features --all-targets ``` +For Rust changes affecting WASM, run the same build as [CI](./.github/workflows/pullrequest.yml): + +```bash +cargo +stable build --workspace --exclude http-signature-directory --all-features --tests --target wasm32-unknown-unknown +``` + We also target Cloudflare's worker environment. A [basic example](./examples/signature-agent-card-and-registry/) exists to confirm our crates work in said environment. Depending on your changes you might need to expand this example or create your own. diff --git a/package-lock.json b/package-lock.json index 695ddd0..81d2de2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -230,6 +230,7 @@ "os": [ "aix" ], + "peer": true, "engines": { "node": ">=18" } @@ -247,6 +248,7 @@ "os": [ "android" ], + "peer": true, "engines": { "node": ">=18" } @@ -264,6 +266,7 @@ "os": [ "android" ], + "peer": true, "engines": { "node": ">=18" } @@ -281,6 +284,7 @@ "os": [ "android" ], + "peer": true, "engines": { "node": ">=18" } @@ -298,6 +302,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">=18" } @@ -315,6 +320,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">=18" } @@ -332,6 +338,7 @@ "os": [ "freebsd" ], + "peer": true, "engines": { "node": ">=18" } @@ -349,6 +356,7 @@ "os": [ "freebsd" ], + "peer": true, "engines": { "node": ">=18" } @@ -366,6 +374,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=18" } @@ -383,6 +392,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=18" } @@ -400,6 +410,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=18" } @@ -417,6 +428,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=18" } @@ -434,6 +446,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=18" } @@ -451,6 +464,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=18" } @@ -468,6 +482,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=18" } @@ -485,6 +500,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=18" } @@ -502,6 +518,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=18" } @@ -519,6 +536,7 @@ "os": [ "netbsd" ], + "peer": true, "engines": { "node": ">=18" } @@ -536,6 +554,7 @@ "os": [ "netbsd" ], + "peer": true, "engines": { "node": ">=18" } @@ -553,6 +572,7 @@ "os": [ "openbsd" ], + "peer": true, "engines": { "node": ">=18" } @@ -570,6 +590,7 @@ "os": [ "openbsd" ], + "peer": true, "engines": { "node": ">=18" } @@ -587,6 +608,7 @@ "os": [ "openharmony" ], + "peer": true, "engines": { "node": ">=18" } @@ -604,6 +626,7 @@ "os": [ "sunos" ], + "peer": true, "engines": { "node": ">=18" } @@ -621,6 +644,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=18" } @@ -638,6 +662,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=18" } @@ -655,6 +680,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=18" }