fix(federation): enforce the signature policy on incoming requests

HTTPSignaturePlug checks the policy before the cryptographic check. A
signed GET that fails it counts as unsigned; the inbox answers 401 to a
POST that fails it instead of queueing a failed-signature retry, which
only re-checks the signature. signature_policy: :log only logs.

Based on Akkoma's HTTP signature hardening.
This commit is contained in:
Lain Soykaf 2026-10-27 21:46:40 +04:00
commit e5481b4c28
No known key found for this signature in database
7 changed files with 329 additions and 59 deletions

View file

@ -0,0 +1 @@
Reject incoming HTTP signatures that do not sign the date, are older than 2 hours (or more than 1 hour in the future), or do not sign the digest of a request body, so captured requests cannot be replayed. Set `config :pleroma, :activitypub, signature_policy: :log` to only log these