Signature-Agent parsers accept an http directory member
Los mantenedores suelen responder en 1 día
@KonstantinMirin ya está trabajando en esto.
Desde el 18/10/2026.
- #163 de @KonstantinMirin — abierto
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- rust, typescript
- Área
- authentication, security
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 182
- Forks
- 49
- Merge medio
- 1 d 20 min
- PR fusionados (30 d)
- 19
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cloudflare/web-bot-auth
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
cloudflare/web-bot-auth#203 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
cloudflare/web-bot-auth#172 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 1-2 días Aptitud para principiantes 56/100
cloudflare/web-bot-auth#202 ·
Los mantenedores suelen responder en 1 día
-
Demo verifier rejects the dictionary-form Signature-Agent that draft -01 requires; accepts the legacy formPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 50/100
cloudflare/web-bot-auth#199 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 54/100
cloudflare/web-bot-auth#195 ·
Los mantenedores suelen responder en 1 día
Todos los issues de cloudflare/web-bot-auth
Issues similares
-
CI/CD ignore-for-release
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
eclipse-ankaios/ankaios#844 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
std: `SliceIndex<str>` missing for `std::ops` ranges, so generic `R: SliceIndex<str>` bounds failAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
symposium-dev/symposium#530 ·
Los mantenedores suelen responder en 5 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día