#social 2018-07-30
2018-07-30 UTC
cdchapman, fr33domlover and cwebber2 joined the channel
cwebber2 joined the channel
#
dansup Hey, having some issues with the GS AP plugin when sending to a mastodon instance
#
dansup Client error: `POST https://mastodon.social/users/dansup/inbox` resulted in a `401 Unauthorized` response: Public key not found for key https://www.hackthis.space/social/index.php/user/1
#
dansup any idea Gargron or nightpool ?
#
dansup I wonder if its the lack of pretty urls in GS
#
dansup nope, hmm
#
dansup kaniini: any idea? ^^
KevinMarks, ben_thatmustbeme, xmpp-social and vasilakisfil joined the channel
#
kaniini dansup what does the http signature look like
#
puckipedia dansup: lemme see
#
puckipedia dansup: your key ID should be "[..]#public-key" also ehm your @context is really really borked
#
puckipedia "manuallyApprovesFollowers": "as=>manuallyApprovesFollowers",
#
puckipedia "sensitive": "as=>sensitive",
#
puckipedia also following/followers should be a proper collection I think
#
JasonRobinson[m] do all platforms generally export a "following/followers" collection, to the public? personally I find it a bit of a privacy issue to show who follows who - I guess it's common in the microblogging world at least twitter. in socialhome you can only see counts. in diaspora you can't even see that. I was thinking of adding a setting at some point to export following, but followers is a bit of a no no since the follower wont have possibility to
#
JasonRobinson[m] approve it.
#
puckipedia I do
#
puckipedia Mastodon does it too, if you block follower/following viewing the pages are inaccessible but you still have the basic collection
#
JasonRobinson[m] hmm not sure I understood that. yeah mastodon I checked already. they have the really nice "add .json to anything" to get the AS2 object, so easy to check :)
#
puckipedia basically, you still have "followers" and it's still a collection
#
puckipedia but, there's no content basically
#
JasonRobinson[m] yes, that is what I will do
Guest84 joined the channel
cdchapman joined the channel
#
up201705417 aaronpk: what is your server?
#
dansup up201705417: the Date header is missing 'GMT'
#
up201705417 I added it
#
up201705417 and also changed some stuff based on what was said here
#
up201705417 aaronpk: the plugin is unable to validate your profile
#
up201705417 I tried to manually grab it but it doesn't give me a JSON representation
#
up201705417 attempted this URL: https://aaronparecki.com/aaronpk
#
up201705417 accept header used: application/activity+json
#
up201705417 it works just fine with dansup's mastodon profile
#
aaronpk curl -H "Accept: application/activity+json" https://aaronparecki.com/aaronpk

#
donpdonp i get json no matter what the mime type
#
up201705417 let me try again here
#
donpdonp yeah the behavior keeps changing
KevinMarks joined the channel
cwebber2 joined the channel
#
up201705417 aaronpk: I've just tried again and it failed as before...
#
up201705417 dansup: can you try aaronpk too?
#
aaronpk what the heck kind of accept header is this? application/ld+json; profile=\x22https://www.w3.org/ns/activitystreams\x22

#
up201705417 oh, that's what it is sending?
#
up201705417 let me check
cwebber2 joined the channel
#
up201705417 ah yeah, that's the plugin accept header on discovery
#
up201705417 I think I read in the spec that that was the header to be used
#
up201705417 let me see
#
up201705417 The client MUST specify an Accept header with the application/ld+json; profile="https://www.w3.org/ns/activitystreams" media type in order to retrieve the activity.
#
up201705417 yeah... locally I used the other (smaller one) for pure laziness
#
up201705417 the plugin is accepting three headers but always sending the big one
cwebber2 joined the channel
#
donpdonp i saw that mimetype;profile=blah in the spec somewhere and just laughed.
#
up201705417 hm, well, in that case I will add some debug routines here
#
up201705417 nah, the plugin handles the content types properly too
#
up201705417 (well, at least I expect him to xD)
cwebber2 joined the channel
#
up201705417 you don't have a "summary" on your profile
#
up201705417 and I told the plugin that everyone without summary was invalid
#
up201705417 sorry
#
up201705417 no, you don't, it was my mistake
cwebber2 joined the channel
#
up201705417 you don't have a name either
#
up201705417 which is another thing I set as necessary
#
up201705417 yes
#
up201705417 okay
#
up201705417 updated the validate function
#
up201705417 let me see if this affects anything else
#
up201705417 and will test again
cwebber2 joined the channel
#
up201705417 all right, this should do it
#
up201705417 will test now
#
up201705417 now this is "better":
#
up201705417 Client error: `POST https://aaronparecki.com/activitypub/inbox` resulted in a `400 Bad Request` response: {"error":"Invalid signature","headers":"(request-target): post \/activitypub\/inbox\ndate: Mon, 30 Jul 2018 07:17:39 GMT (truncated...)
#
up201705417 yeah, got some bugs fixed! :)
#
up201705417 hm, any idea of what could be wrong?
fr33domlover joined the channel
#
donpdonp up201705417: can you paste the string you're signing?
#
donpdonp erros are usually easy to spot
#
up201705417 GS truncates the return, will add a debug log on the return so that I can see it, give me a sec
#
donpdonp does aaronpk's http verifier actually read the headers list? you've got headers beyond the bare minimum in the signing list
cwebber2 joined the channel
#
up201705417 I'm using a custom version by dansup that adds rsa-sha256
#
up201705417 just added another debug info
#
dansup ok
#
up201705417 aaronpk: dansup pushed an update
#
up201705417 and it seems to have worked
#
up201705417 did you receive a notice there?
#
up201705417 for mastodon I got this though: Client error: `POST https://mastodon.social/users/dansup/inbox` resulted in a `401 Unauthorized` response: Public key not found for key https://www.hackthis.space/social/index.php/user/1#public-key
#
up201705417 from hackthis URL?
#
up201705417 I've set the header to:
#
up201705417 header('Content-Type: application/activity+json');
#
aaronpk curl -H "Accept: application/json" https://www.hackthis.space/social/index.php/user/1

#
up201705417 oh great :/
#
up201705417 working on that
#
up201705417 okay, that's fixed
#
dansup application/json is valid? https://www.w3.org/TR/activitypub/#retrieving-objects
#
up201705417 it isn't in the spec afaik
#
up201705417 mastodon keeps throwing the error
#
up201705417 so that isn't the issue
vasilakisfil joined the channel
#
puckipedia up201705417: oh hmm, idea
#
up201705417 *-* say it!
#
puckipedia curl -H "Accept: application/activity+json, application/ld+json, application/atom+xml, text/html" https://www.hackthis.space/social/index.php/user/1
#
puckipedia that should be enough info right? :P
#
up201705417 wut?
#
puckipedia that's the header that Mastodon sends
#
up201705417 ah
#
up201705417 yeah, why?
#
puckipedia aaronpk: fallback. checks link headers and link meta tags
#
puckipedia json_link = page.xpath('//link[@rel="alternate"]').find
{ |link| ['application/activity+json', 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'].include?(link['type']) }
#
nightpool[m] ya
#
puckipedia would say yes
#
nightpool[m] we mentioned this on your ticket.
#
nightpool[m] iirc
#
puckipedia this is for both actors and posts iirc
#
aaronpk ahh found that discussion, forgot about that https://github.com/w3c/activitypub/issues/310

#
up201705417 hi
#
up201705417 sorry the away
#
up201705417 puckipedia: did what you said
#
up201705417 and it still gives this:
#
up201705417 Client error: `POST https://mastodon.social/users/dansup/inbox` resulted in a `401 Unauthorized` response: Public key not found for key https://www.hackthis.space/social/index.php/user/1#public-key
#
up201705417 but now the curl command you sent works
#
puckipedia up201705417: whatever you've done it's not really resilient
#
puckipedia you should properly parse the Accept header
#
up201705417 fair enough
#
up201705417 give me a minute
#
up201705417 puckipedia: it was a large minute
#
up201705417 sadly both yesterday and today are being busy IRL days
#
up201705417 so, I think now it is a resilient solution
#
up201705417 yet, mastodon still doesn't like me: Client error: `POST https://mastodon.social/users/dansup/inbox` resulted in a `401 Unauthorized` response: Public key not found for key https://www.hackthis.space/social/index.php/user/1#public-key
#
puckipedia yeah, I'm slightly unsure now of everything, sorry
#
up201705417 lol
#
up201705417 dansup: do you have any other ideas of what is going wrong?
#
dansup up201705417: Have you tried a pleroma instance?
#
donpdonp up201705417: you want to try following don@donpark.org ?
#
dansup pleroma.site/users/pixeldev
#
up201705417 just sent a notice to pleroma
#
donpdonp its my activitypub perl script (not always running but it is now) and it dumps the details of each request to my console.
#
up201705417 may I send a notice there donpdonp?
#
donpdonp up201705417: oh are you already past the 'following' stage and now are sending Notes?
#
up201705417 (to do a follow request I have to write a bit more)
#
donpdonp up201705417: you can send whatever you like. its not very 'real'
#
up201705417 now, we are just testing with the notices first xd
#
donpdonp just some perl pretending to be an AP site
#
aaronpk whoa, pleroma returns an atom feed for an individual post?? https://pleroma.site/notice/2684664

#
donpdonp up201705417: hmm that test might have revealed a problem on my side rather than yours. i assume you just did the webfinger lookup. the site sent back the AP profile for my user but the back-and-forth stops there
#
up201705417 yeah, the Explorer failed in grabbing your profile
#
up201705417 let me get you the logs
#
up201705417 donpdonp: https://git.gnu.io/snippets/436
#
puckipedia aaronpk: so not actually looking at the result, but yeah, that's what ostatus sends out for updates
#
donpdonp up201705417: hmm ok i'll look into that thx.
#
up201705417 will try again specifying different routes
#
up201705417 this worked: @donpark.org/don This is a test notice published by a GNU Social instance using ActivityPub.
#
up201705417 what have you got on your side?
#
up201705417 (I think that according to the spec this is the only one you have to support...)
#
up201705417 so... it looks kinda well
#
up201705417 what do you think?
#
donpdonp i dont see anything wrong off hand. the two different sig headers are dupes. just "Signature: " works for me
#
donpdonp $ curl -H 'accept: application/json' 'https://www.hackthis.space/social/index.php/user/1#public-key'|jq .publicKey.id => "https://www.hackthis.space/social/index.php/user/1#public-key"
#
donpdonp keyId="https://www.hackthis.space/social/index.php/user/1#public-key"
#
donpdonp that looks like a match to me. not sure what mastodon is saying.