Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Kitsune to sign outgoing GET requests #267

Open
perillamint opened this issue Jul 9, 2023 · 3 comments
Open

Make Kitsune to sign outgoing GET requests #267

perillamint opened this issue Jul 9, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@perillamint
Copy link
Contributor

perillamint commented Jul 9, 2023

Currently, Kitsune is not signing profile GET requests and able to federate with instances which does not require signed GET requests.

However, some Mastodon instances require signed requests to fetch profile and (public / unlisted) toots.

Proposal

Implement signed GET request to enhance interoperability between some Mastodon instances

@perillamint perillamint added the enhancement New feature or request label Jul 9, 2023
@aumetra
Copy link
Member

aumetra commented Jul 9, 2023

Definitely a good addition

Something I also want to mention is that GoToSocial's default mode is "authorized fetch" mode, so to federate with any GoToSocial instance, we have to sign our fetches

@perillamint
Copy link
Contributor Author

So... here is my abstract idea to choose the key to sign the request:

If the fetch request is initiated by a user with valid session: Use the user key to sign the request.
If the fetch request is initiated by an anonymous user: Use the system actor key to sign the request, OR sent out the unsigned request (not desirable, but it will be easier to implement, because it does not depend on #318)

@tesaguri
Copy link
Contributor

If the fetch request is initiated by a user with valid session: Use the user key to sign the request.

I think the use of users' keys has some privacy implications (which I've elaborated on at mastodon/mastodon#34 (comment)) and believe that the system actor's key should be used instead whenever the user's key isn't necessary (e.g. when fetching the outbox of a remote actor whom the requesting user isn't following).

However, I'm not aware of a feature of Kitsune as it stands that fetches remote objects by users' request and doesn't require the user's key. The closest one is GET /api/v1/accounts/search?resolve=true, but the endpoint also benefits from the user's key when fetching private objects. It might still be sensible to have a mechanism for opting out of the use of the key in this endpoint, but that would likely to involve a new Mastodon API parameter and hence should be designed by the upstream Mastodon team first, I think (if they are willing to introduce such a feature).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants