yukimochi / Activity-Relay

Yet another powerful customizable ActivityPub relay server written in Go.
https://relay.toot.yukimochi.jp/
GNU Affero General Public License v3.0
278 stars 39 forks source link

Mastodon instances in "secure mode" canot use the relay #94

Open mhamzahkhan opened 4 months ago

mhamzahkhan commented 4 months ago

Mastodon relays that have AUTHORIZED_FETCH or "secure mode" enabled, do not work with the relay (https://docs.joinmastodon.org/admin/config/#authorized_fetch).

Looks like this is because you have to sign the request when fetching the public key here: https://github.com/yukimochi/Activity-Relay/blob/528e801a64c2514b21ae711d635aa96d28fc6ca9/models/models.go#L100

Without it, the request returns a 401 from instances that have secure mode enabled.

yukimochi commented 4 months ago

Mastodon explains that relays do not work properly in secure mode. (Appears when trying to enable relay in secure mode.)

It is unclear whether the relay will work correctly by signing the request during account acquisition. However, I think it's a good idea to use signatures for account acquisition, so I'll incorporate it into my implementation plan.