Email or username:

Password:

Forgot your password?
Top-level
Григорий Клюшников

It's not final yet, I'm still figuring out how to authenticate users and all that stuff to make sure the group actor retains access control.

3 comments
Alex Gleason

I made the group actor like a relay, and the thing I couldn’t figure out was how to Announce private posts.

Since the original post is wrapped in an Announce, HTTP Signature headers don’t work, and since it’s private it can’t be refetched. So there’s no way for the remote server to verify it. 🤔

Григорий Клюшников

Alex Gleason, yeah I decided to go against Announce as it already has semantics attached to it, I use Add instead (as per my FEP). For private posts, I'm thinking about using some kind of temporary token issued and signed by the group actor. These effectively say "here, the relay allows me to get this object". So the flow for fetching a post from a remote instance A, made in a private group in instance B, would be:
1. Make a POST request to the token endpoint of the group actor (I'll put it somewhere in `endpoints`) and get a token. Probably a flat json object with all fields except the signature itself hashed and signed like headers.
2. Make a GET request to the post URL (on instance A), including a signature by the user actor (to prove that this is indeed your token) and the token, probably in Authorization header.
3. Instance A would verify both the request signature and the one in the token.
4. If both signatures are correct, and the token hasn't expired, you get the post. Otherwise, you get a 403.

The token needs to be time-limited to allow group admins to remove users from the group and prevent their access to any future content. And it's a token instead of, for example, instance A making a request to instance B every time someone wants to fetch something, in order to reduce traffic and delays when someone is fetching many objects all at once, like a large comment thread.

Alex Gleason, yeah I decided to go against Announce as it already has semantics attached to it, I use Add instead (as per my FEP). For private posts, I'm thinking about using some kind of temporary token issued and signed by the group actor. These effectively say "here, the relay allows me to get this object". So the flow for fetching a post from a remote instance A, made in a private group in instance B, would be:
1. Make a POST request to the token endpoint of the group actor (I'll put it somewhere...

Григорий Клюшников

Alex Gleason, this is what the token looks like. I'll be sending it as
Authorization: ActivityPubActorToken <this json thing>
And this is in addition to an http signature of course.

Go Up