michaelcpuckett / ap-groups

Groups for the Fediverse
https://chirp.social
MIT License
36 stars 0 forks source link

Federation with Pleroma #1

Closed skysarwer closed 1 year ago

skysarwer commented 1 year ago

Groups on Chirp Social do not seem to be discoverable on Pleroma instance.

I've tested by trying to find @art@chirp.social on a number of Pleroma servers (public.garden & stereophonic.space) with no results.

michaelcpuckett commented 1 year ago

Thanks for pointing this out! I hadn't used Pleroma before but I signed up for an account and can confirm it doesn't show up.

Mastodon is also a little flaky. I think maybe due to some kind of caching there...

I added .well-known/host-meta after taking a look at their documentation. This might have helped, but still not appearing in results.

Here's my server log after I looked it up from Pleroma:

INCOMING: /.well-known/host-meta
INCOMING: /.well-known/webfinger?resource=acct:art@chirp.social
INCOMING: /@art

It does seem like it's following the trail from host-meta -> webfinger -> account profile. So I'm surprised it doesn't appear.

I'll keep looking into it, thanks again!

skysarwer commented 1 year ago

Awesome. Thanks for looking into it, and for the great app.

Yea, I also noticed it being flaky on Mastodon. When I follow a group, it stays stuck as "Awaiting approval".

michaelcpuckett commented 1 year ago

I added well-known/nodeinfo without any luck as well.

I wasn't able to look up any Mastodon profile on any Pleroma instance using the @user@domain syntax or even with a direct URL. So I'm starting to wonder if profile discovery is possible?

@skysarwer What's your experience with searching for Mastodon profiles on Pleroma?

michaelcpuckett commented 1 year ago

I also see that @wordpress has 0 followers, so there must have been some kind of issue with follow/accept handshake. If you have time, please try to unfollow and re-follow.

skysarwer commented 1 year ago

@michaelcpuckett Profile discovery on Pleroma has been working fine for me. What handles were you searching, if I may ask? If you were testing on the Public Garden server, I did notice that it was a little slow today so that may have affected things.

skysarwer commented 1 year ago

I also see that @WordPress has 0 followers, so there must have been some kind of issue with follow/accept handshake. If you have time, please try to unfollow and re-follow.

Still isn't working, unfortunately. I tried following, but it remained stuck on "Withdraw Follow Request".

The Mastodon account I am using to test this is @evn@c.im

michaelcpuckett commented 1 year ago

@skysarwer Thank you so much for trying again! That helped me debug.

The handshake isn't working because when attempting to GET the profile, it's hitting response 401 "Request not signed"

I can verify by using Postman/CURL to GET https://c.im/users/evn with Accept header set to application/activity+json

I haven't seen this with other Mastodon accounts so far but I think it's due to an optional Secure Mode that Mastodon servers can turn on.

https://docs.joinmastodon.org/spec/security/

When secure mode is enabled, all GET requests require HTTP signatures as well.

I will look into how to implement that ASAP.

michaelcpuckett commented 1 year ago

Regarding Pleroma, I'm having trouble telling if this recent PR handles remote domain webfinger discovery and maybe some servers don't have it yet?

https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3361#note_96475

michaelcpuckett commented 1 year ago

OK I have updated the upstream code to send HTTP signatures.

michaelcpuckett commented 1 year ago

Looks like now instead of "Request not signed", Mastodon in Secure Mode is sending "Verification failed" so I must have implemented it incorrectly. I'll take another look.

michaelcpuckett commented 1 year ago

I updated the HTTP signature code again to properly format GET requests.

You can try again @skysarwer - wish I had a better way to test, sorry about that!

michaelcpuckett commented 1 year ago

I realized I could sign up for a c.im account, so assuming that the entire server is in Secure Mode, I was able to make the follow/accept handshake from that server. I think that issue is closed.

michaelcpuckett commented 1 year ago

Re: Pleroma profile discovery

When I go to https://blob.cat/main/public -> Search box, and search for:

FAILS: @art@chirp.social FAILS: https://chirp.social/@art FAILS: @mxp@c.im FAILS: https://c.im/users/mxp FAILS: @mastodon@mastodon.social

Although the docs say remote profile discovery is supported:

https://docs-develop.pleroma.social/backend/configuration/how_to_serve_another_domain_for_webfinger/

It seems based on this comment that it's not supported yet or has just been released:

https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3361#note_96475

If you are able to look up Mastodon profiles from your Pleroma instance, please let me know. If not, I think this can be closed.

skysarwer commented 1 year ago

I realized I could sign up for a c.im account, so assuming that the entire server is in Secure Mode, I was able to make the follow/accept handshake from that server. I think that issue is closed.

That is working on my end too! Looks like it is closed indeed. Thank you so much, that is incredible.

skysarwer commented 1 year ago

Re: Pleroma profile discovery

When I go to https://blob.cat/main/public -> Search box, and search for:

FAILS: @art@chirp.social FAILS: https://chirp.social/@art FAILS: @mxp@c.im FAILS: https://c.im/users/mxp FAILS: @mastodon@mastodon.social

Although the docs say remote profile discovery is supported:

https://docs-develop.pleroma.social/backend/configuration/how_to_serve_another_domain_for_webfinger/

It seems based on this comment that it's not supported yet or has just been released:

https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3361#note_96475

If you are able to look up Mastodon profiles from your Pleroma instance, please let me know. If not, I think this can be closed.

I am able to log into public.garden and discover @mxp.cim and https://c.im/users/mxp without any issue.

Perhaps blob.cat has c.im blocked or vice versa.

skysarwer commented 1 year ago

Just sharing some screenshots of https://c.im/@mxp and some gup.pe groups being on Public Garden (via Pleroma)

Screenshot 2022-11-30 220958

Screenshot 2022-11-30 220859

michaelcpuckett commented 1 year ago

Thanks for providing that info! I was able to log in and see my own account on Mastodon but not any chirp.social accounts, so the issue is verified.

In the server logs I see requests to host-meta, webfinger, and the account profile being search for.

I looked at my host-meta again and where it needed to return XML it was invalid because there was whitespace at the start.

I tested again since making that change but it still doesn't fix the issue.

I'm wondering what's different about Pleroma (vs Mastodon and Friendica) -- I'll do some more digging soon.

michaelcpuckett commented 1 year ago

I tried a couple things:

Neither seemed to work so far.

Going to continue looking through the Pleroma issues for discovery-related topics.

michaelcpuckett commented 1 year ago

OK, I have isolated the issue.

Pleroma does not support when an actor's profile's type is an array.

I opened an issue on their tracker:

https://git.pleroma.social/pleroma/pleroma/-/issues/3013

I have been generating actors with type: [ 'Group' ] but I will update that to be just type: Group.

michaelcpuckett commented 1 year ago

OK fixed for me! Please let me know if you still see any issues.

skysarwer commented 1 year ago

Confirmed it's working on my end too! Amazing work! Super exciting.