Open
Description
According their recent announcement and the related issue on their issue tracker, Mastodon will be implementing HTTP Message Signatures (RFC 9421) in the next two minor versions (4.4 and 4.5). Since Mastodon is the most widely-used fediverse software, we need to implement RFC 9421 to maintain compatibility.
Background
- Mastodon currently uses Cavage HTTP Signatures (draft-cavage-http-signatures-12)
- In Mastodon 4.4, they will add support for validating RFC 9421 signatures
- In Mastodon 4.5, they will start signing requests using RFC 9421
Implementation requirements
Double-knocking implementation
We need to implement double-knocking to maintain compatibility with servers using different HTTP signature versions:
- First attempt: Try RFC 9421 signature
- If rejected (HTTP 401): Fall back to Cavage HTTP Signatures
- Handle both signature verification methods for incoming requests
Core requirements
- Implement RFC 9421 signature verification
- Implement RFC 9421 signature generation
- Maintain backwards compatibility with Cavage HTTP Signatures for other fediverse software
- Add tests to verify correct signature generation and verification
- Update documentation to reflect the new signature support