Skip to content

fix(picky)!: comply with draft-cavage-http-signatures-12 when signing HTTP messages#351

Merged
Benoît Cortier (CBenoit) merged 1 commit intoDevolutions:masterfrom
sp1ff:fix-target-field-in-sig
Mar 3, 2025
Merged

fix(picky)!: comply with draft-cavage-http-signatures-12 when signing HTTP messages#351
Benoît Cortier (CBenoit) merged 1 commit intoDevolutions:masterfrom
sp1ff:fix-target-field-in-sig

Conversation

@sp1ff
Copy link
Contributor

Not sure if picky is attempting to be compliant with "draft-cavage-http-signatures-12" (i.e. the algorithm used throughout the Fediverse), or not. If so, the request target field in the signing string gets its own "pseudo-header name": (request-target). This PR changes that & updates the test suite accordingly.

Commit message follows:

For reasons unclear to me, the http-signature module treats the request target specially in that it is added to & read from the signing string with no header name (unlike, say, (created) or (expires)). As we see here, it, too, has a "psuedo-header" name: (request-target).

It's absence from the signing string was breaking my attempts to use picky to validate message signatures from Mastodon.

…tures-12

when signing HTTP methods.

For reasons unclear to me, the `http-signature` module treats the request
target specially in that it is added to & read from the signing string with
no header name (unlike, say, `(created)` or `(expires)`). As we see
[here](https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures-12#page-9),
it, too,  has a "psuedo-header" name: `(request-target)`.

It's absence from the signing string was breaking my attempts to
use picky to validate message signatures from Mastodon.
Copy link
Member

@CBenoit Benoît Cortier (CBenoit) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! It is a you said. Probably something was misunderstood at the time. Let’s merge this compliant version of the code. We’ll advertise this as a breaking change for the next major release.

@CBenoit Benoît Cortier (CBenoit) changed the title Change request target handling to comply with draft-cavage-http-signatures-12 when signing HTTP messages fix(picky)!: comply with draft-cavage-http-signatures-12 when signing HTTP messages Mar 3, 2025
@CBenoit Benoît Cortier (CBenoit) merged commit f043d04 into Devolutions:master Mar 3, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants