-
-
Notifications
You must be signed in to change notification settings - Fork 328
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
[bug] Federation issues with Bookwyrm #1676
Comments
Hmmm, 406 means that content negotiation is failing and GtS can't serve anything in response. What are you setting for your edit: sorry, I mean what content type are you setting in your |
Looks like we have |
Aha! Yeah, I think it should be something like what's described here: https://www.w3.org/TR/activitypub/#retrieving-objects So EDIT just double checked and we also serve AP when Accept is |
This is the header described in the ActivityPub spec, which should fix some federation problems with GoToSocial and potentially other picky services. Related: bookwyrm-social#2794, superseriousbusiness/gotosocial#1676
Great, thanks for the help! Just put up a PR in Bookwyrm to fix this, will close this issue here :) |
You're welcome! Lemme know if there's anything else, would be happy to help :) |
This is the header described in the ActivityPub spec, which should fix some federation problems with GoToSocial and potentially other picky services. Related: bookwyrm-social#2794, superseriousbusiness/gotosocial#1676
Reopening this, since after fixing the Accept header, we're seeing a 401 when trying to make requests to GtS. How can we get more info on what GtS doesn't like about the request? See bookwyrm-social/bookwyrm#2800 for details. Any pointers on figuring this out? cc @hughrun |
I've done some more testing of this and it appears to be something to do with Bookwyrm signatures not being accepted by GtS. If I send a message from GtS to Bookwyrm, Bookwyrm tries to access the GtS user's account info (to check the GtS user's signature in order to verify the signed digest) but GtS is returning a |
I've been poking at it myself this morning and indeed you seem to be right about GtS not accepting Bookwyrm's signature. I looked in here and this all looks OK to me: https://github.com/bookwyrm-social/bookwyrm/blob/main/bookwyrm/signatures.py#L25. So I'm not sure yet what the issue is. I'll try to gather some trace logs and see what's happening. Did you already get Bookwyrm working with secure mode mastodon btw? I tried following some bookwyrm accounts from ondergrond.org (which uses secure mode), and that also didn't seem to work, as far as I can tell. So there could be a common issue there, unless I'm mistaken (which is v. possible!). |
The latest Bookwyrm definitely works with secure Mastodon, but this is a fairly recent update so some servers may not be up to date. |
OK, thanks for the confirmation! We (GtS) are going on holiday soonish until the end of this month, so this is likely something that will have to wait til start of May. Keen to get GtS and Bookwyrm playing nicely together. |
I got a bit further on the Bookwyrm side of this, and I think I found the reason GTS isn't validating the signatures from Bookwyrm. With that patch applied, I get the following on my test instance when trying to follow:
And when I hit that endpoint on the bookwyrm instance, I get the following JSON:
If GTS is looking for the exact ID in the JSON, that's probably where the communication is breaking down. I'm not familiar enough with the spec to say which side should be normalizing this, though I'd tend to go with the robustness principle and say that both should. |
Ok I have almost fixed this!
|
Ahhh thank you for the investigation and the fixes! Awesome 😍 I think in the case of sending |
@tsmethurst all good, I think I have dealt with that at our end - it's a bit unclear to me which is the correct behaviour but both make sense. The last piece of the puzzle (since every time I fix something I find a new, exciting bug) is that there are two problems which I suspect have the same root cause:
As far as I can tell, these messages are received and accepted both by GtS and Bookwyrm, but both systems then just don't notify mentioned users and don't deliver DMs to user inboxes. This is quite weird, and I'd appreciate any tips you might have (noting that you've told us you'll be on leave soon, so if we have to wait, we have to wait 😄 ). |
Oh in case you're interested, my fixes so far are at bookwyrm-social/bookwyrm#2812 |
that is super weird! could you post an example of a bookwyrm post with a mention in it? then (after break) we can add it to our GtS tests and see if we can figure out what's happening... |
I figured it out!!! GtS expects the I think GtS should accept either format, but we can make changes at the Bookwyrm end too. There's a small remaining problem but that has nothing to do with GtS. Thanks for helping talk this through. |
agreed!
My pleasure! 😍 |
Gonna close this from our side since it's fixed in bookwyrm-social/bookwyrm#2812 <3 |
Describe the bug with a clear and concise description of what the bug is.
As reported by @kvibber in bookwyrm-social/bookwyrm#2794, searching for a GTS user from a Bookwyrm instance results in a error, stemming from GTS giving a 406 error in response to Bookwyrm's signed request. It's fairly likely the error is on Bookwyrm's side, since signed requests are fairly new for us, but I'm opening this issue here to get some feedback, in case it's obvious what's going wrong.
Our signatures for this request have a
keyId
that looks likehttps://bookwyrm.social/user/bookwyrm.instance.actor#main-key
, and a algorithm ofrsa-sha256
, you can see the code we use to generate them inbookwyrm/signatures.py
.What's your GoToSocial Version?
0.8.0-rc1 git-e46323c
GoToSocial Arch
No response
What happened?
No response
What you expected to happen?
No response
How to reproduce it?
Search for a GTS user from any Bookwyrm instance running Bookwyrm v0.5.5 or later.
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: