Implementing RFC 8941 Structured Field Values for HTTP - 10/1/2025, 11:00:13 PM
Implementing RFC 8941 Structured Field Values for HTTP - 9/30/2025, 11:00:15 PM
Implementing RFC 9421 HTTP Message Signatures - 9/29/2025, 11:00:41 PM
Implementing RFC 9421 HTTP Message Signatures - 9/26/2025, 10:55:34 PM
For some reason I was sending an invalid value with the alg property, and, uhhh, Matthew, you really should have paid attention to Section 3.3 under each algorithm where it states the possible acceptable values:
rsa-pss-sha512rsa-v1_5-sha256 hmac-sha256ecdsa-p256-sha256ecdsa-p384-sha384ed25519I only have support for rsa-v1_5-sha256 (incoming or outgoing) at the moment (as does Mastodon), but finally I have my first successful signed RFC 9421 POST requests to both a Mastodon instance and Wordpress ActivityPub Plugin instance. Those plugins are handling the covered components that I chose to use fine.
Rereading RFC 9421 HTTP Message Signatures again I noticed that I had missed some specifics to case-sensitivity with regard to covered component values.
@method value is case-sensitive so the value should be as-is.@authority value is normalized to lowercase and the default port is omitted.@scheme value MUST be normalized to lowercase.@request-target, @target-uri, @path, and @query. And anything with query parameters could have percent-octet encoded values.I have been wrongly transforming most values because of muscle memory of cavage-12 draft signature.
Χ©ΧΧΧ ΧΧΧΧ RFC 9421: ΧΧΧ©ΧΧ ΧΧΧΧ’Χͺ Χ’Χ Χ‘Χ€Χ¦ΧΧ€ΧΧ§Χ¦ΧΧ ΧΧΧ’ΧΧ¨Χͺ ΧΧ€ΧͺΧΧΧͺ Χ¦ΧΧΧΧ¨ΧΧΧ ΧΧ©Χ¨Χͺ? ΧΧ© ΧΧ¨Χ ΧΧΧΧΧͺ ΧΧΧΧ ΧΧ€ΧͺΧ ΧΧ©ΧΧΧ© ΧΧΧ§Χ©Χ ΧΧ‘ΧΧΧΧͺ?
Question about RFC 9421: how is one supposed to transfer a public key to the server to verify signatures, or to infer what key a request uses? Is this a me problem, or is there a spec?
When double-knocking for RFC 9421, Lemmy will respond with a 400 Bad Request, so I need to check that as well as a 401 in order to figure out if I should send a follow-up cavage-12 request.
In other news, I still have not debugged why only POST requests are not valid on Mastodon for RFC 9421. There is something unique about comparing the signatures when only content-digest is included, but it is not the digest itself because otherwise Mastodon would raise a validation error earlier. At the moment, only one Mastodon instance I federate with is accepting those requests anyway. Hopefully the error messages aren't too bad.
@obenland I didn't realize that either, and it makes FEP-844e less attractive. However, capability discovery might still be preferable to double-knocking because RFC-9421 is not the last upgrade. Some applications are already starting to use EdDSA signatures, and that requires triple knocking. In the future we will need to switch to post-quantum cryptography and so on. The number of knocks always increases, but capability discovery requires a constant number of requests.