Let verify() callers require coverage before key lookup, and export the strict field parser
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- cryptography, typescript
- Ambito
- backend-api-design, security
Direzione di ricerca
Read verify() and VerifyOptions, then follow assertPolicyCoverage and resolveVerifier to see where policy fields are passed. For the parser request, inspect parseStrictDictionary in core.ts and its existing SignatureError codes. Done means both option fields reach the pre-resolver checks, with required parameters retaining the Web Bot Auth minimum, and callers can import the strict parser; the issue says both changes already have separate PRs and tests.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This issue has two small requests. Both let a caller of web-bot-auth or http-message-sig apply the checks the library already has, at the point the library already applies them.
verify() cannot require more coverage before the resolver runs
verify() builds the http-message-sig policy itself:
requiredComponents: [],
requiredParameters: ["created", "expires", "keyid", "alg", "tag"],
The resolver receives keyid, algorithm, and signatureAgent, but not the covered components or the parameters. A deployment that needs more than the Web Bot Auth minimum, such as @method and content-digest coverage, or a nonce, can check it only in validate. validate runs after the resolver has fetched key material and after the signature check. Every request that fails such a rule still costs a directory fetch, and the directory fetch is the step that Section 6.7 of draft-ietf-webbotauth-httpsig-protocol-00 treats as an SSRF and resource risk.
http-message-sig already checks requiredComponents and requiredParameters in assertPolicyCoverage, before resolveVerifier. The request is to expose those two fields on VerifyOptions and pass them through. In this proposal, requiredParameters adds to the five Web Bot Auth parameters and can't remove one.
Callers that read Signature-Input need a second tokenizer
verifySignature refuses duplicate member keys, duplicate parameters, and RFC 9651-only values in Signature and Signature-Input, through parseStrictDictionary in core.ts. RFC 8941 parsers, including structured-headers, keep the last instance of a duplicate key instead.
A caller that reads Signature-Input before verification needs the same rules, or the caller and verifySignature disagree about which header is malformed. For example, the caller might read it to pick a label, to route a request to one of several profiles, or to answer 400 before any key lookup. Today that means a hand-written duplicate-key tokenizer. The AdCP TypeScript SDK carries two for this reason.
The request is to export parseStrictDictionary, with the SignatureError codes it already throws.
Interaction with #122
If web-bot-auth moves to fetch-message-signatures, the first request still applies to the policy object verify() builds, and the second request moves to the Structured Fields parser that fetch-message-signatures exports. I can rebase either change onto
#122.
I have both changes ready as separate PRs, with tests.
- Lingua principale
- Rust
- Stelle
- 182
- Fork
- 49
- Merge medio
- 1g 20m
- PR unite (30g)
- 19
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cloudflare/web-bot-auth
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cloudflare/web-bot-auth#203 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
cloudflare/web-bot-auth#172 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 56/100
cloudflare/web-bot-auth#202 ·
I maintainer di solito rispondono entro 1 giorno
-
Demo verifier rejects the dictionary-form Signature-Agent that draft -01 requires; accepts the legacy formForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 50/100
cloudflare/web-bot-auth#199 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 54/100
cloudflare/web-bot-auth#195 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cloudflare/web-bot-auth
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
topgrade-rs/topgrade#2540 ·
I maintainer di solito rispondono entro 1 giorno
-
Invalid JSON options for ngram and edge_ngram silently use defaultsForse già presa @Tilendlesa l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
noemaforge/vimanam#153 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno