Signature-Agent parsers accept an http directory member
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- rust, typescript
調査の方向性
Read packages/web-bot-auth/src/registry.ts and crates/web-bot-auth/src/registry.rs, starting at validateDiscoveryURI and validate_discovery_uri; compare the directory handling with the existing jwks_uri and cimd checks. Review the open PR #163 and its tests for the dictionary, type=directory, and legacy String forms. Done means all discovery forms enforce the stated HTTPS rule and their tests pass.
索引モデルが issue の本文から書いたものです。
説明
parseSignatureAgentHeader in packages/web-bot-auth/src/registry.ts and parse_signature_agent_header in crates/web-bot-auth/src/registry.rs accept a directory member whose value uses the http scheme. Both parsers require https for jwks_uri and cimd. verify() passes the http member to the resolver as candidate.signatureAgent, and returns it as the verified signatureAgent.
draft-ietf-webbotauth-httpsig-protocol-00 requires https for every member:
- Section 5.2.1: "Its member values MUST be String Items that contain a [URI], whose scheme MUST be https."
- Section 5.5.1: "The directory MUST be served over HTTPS."
The editor's copy keeps the Section 5.2.1 sentence. The parsers landed in #92 in June 2026, and the https rule first appeared in draft-meunier-webbotauth-httpsig-protocol-01 in August, so the parsers may predate the rule rather than allow http on purpose.
Reproduction
With web-bot-auth 0.2.0 and http-message-sig 0.3.0 from npm:
import { component, createSignature } from "http-message-sig";
import { parseSignatureAgentHeader, verify } from "web-bot-auth";
import { signerFromJWK, verifierFromJWK } from "web-bot-auth/crypto";
parseSignatureAgentHeader('sig1="http://signature-agent.test"');
// {"kind":"current","entries":[{"label":"sig1","uri":"http://signature-agent.test","type":"directory"}]}
// RFC 9421 Appendix B.1.4 test key
const key = {
kty: "OKP",
crv: "Ed25519",
d: "n4Ni-HpISpVObnQMW0wOhCKROaIKqKtW_2ZYb2p9KcU",
x: "JrQLj5P_89iXES9-vFgrIy29clF9CC_oPPsw3c5D0bs",
};
const signer = await signerFromJWK(key);
const verifier = await verifierFromJWK(key);
const now = Math.floor(Date.now() / 1000);
const request = new Request("https://example.com/", {
headers: { "Signature-Agent": 'sig1="http://signature-agent.test"' },
});
const fields = await createSignature(request, {
label: "sig1",
components: ["@authority", component("signature-agent", { key: "sig1" })],
parameters: { created: now, expires: now + 300, keyid: signer.keyid, alg: "ed25519", tag: "web-bot-auth" },
signer,
});
request.headers.set("Signature", fields.signature);
request.headers.set("Signature-Input", fields.signatureInput);
const result = await verify(request, { resolver: () => verifier });
result.signatureAgent.uri; // "http://signature-agent.test"
A resolver that fetches the directory named in candidate.signatureAgent fetches it over http. The verification worker example does this in fetchDirectory.
Proposed change
Apply the https check that the parsers make for jwks_uri and cimd to every discovery type. I have a PR ready that changes validateDiscoveryURI and validate_discovery_uri, and adds tests for the dictionary form, the type=directory form, and the legacy String form.
A caller that signs or verifies against a local http directory then gets an error from sign() and verify(). If local development needs http, an explicit option could cover it.
- 主要言語
- Rust
- スター
- 182
- フォーク
- 49
- 平均マージ
- 1日 20分
- マージ済み PR(30日)
- 19
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudflare/web-bot-auth のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
cloudflare/web-bot-auth#203 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
cloudflare/web-bot-auth#172 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 1〜2日 初心者へのやさしさ 56/100
cloudflare/web-bot-auth#202 ·
メンテナーはふだん 1 日以内に返信
-
Demo verifier rejects the dictionary-form Signature-Agent that draft -01 requires; accepts the legacy form対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 50/100
cloudflare/web-bot-auth#199 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 54/100
cloudflare/web-bot-auth#195 ·
メンテナーはふだん 1 日以内に返信
cloudflare/web-bot-auth の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
symposium-dev/symposium#530 ·
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
topgrade-rs/topgrade#2540 ·
メンテナーはふだん 1 日以内に返信
-
Invalid JSON options for ngram and edge_ngram silently use defaults対応中かも @Tilendlesa が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
noemaforge/vimanam#153 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信