For context for those who might not know. A bit over a year ago, during tangleds infancy, there was a lot of talk in the tangled discord about how to approach organisations. I voiced my opinion on that quite early on which essentially boiled/boils down to a delegated/indirected authn mechanism very much like described in the current opensocial proposal. The design work I did then and since has ended up resulting in delegated accounts in Tranquil PDS the basic model of which I had hoped to polish and offer up as a starting point for a community wide spec. As such I'm unsurprisingly very excited about the opensocial.group push! And with the practical experience in this area that working on delegated accounts in Tranquil has given me, reading over the proposal as is there are a few pain points that stick out. Some or most of these likely make sense to peal off into dedicated issues, but I'm starting them here for now for simplicities sake.
Authn and authz #
Currently as described the system is very similar to what we have in Tranquil. A few things of note that haven't been considered yet though:
- We found in Tranquil that a lot of the time, admins and other really high level members need/want to have permission to call all XRPC methods on all services. However the standard atproto permissions specifically disallow
rpc:*?aud=*. In Tranquil we specifically allow this for permissions granted to delegated account members. That solution should be adopted for opensocial in my opinion and should be explicitly called out in the spec/proposal. - Attestation of the user that a delegated/group account session is backed by is something I've been experimenting with in Tranquil. I think it's a worthwhile feature for application services to be able to know who is puppeteering the group identity. We don't have anything for this in Tranquil currently, but the plan is likely to put a service auth token (valid for a marker NSID not a real XRPC endpoint) from the backing user account into an
actclaim on group account service auth tokens. That's the best I've been able to come up with so far. At least that doesn't require massive changes to atprotos authn layer. - Another thing I've considered for Tranquils delegated accounts is allowing member users to directly call endpoints on the Tranquil instance holding a delegated account with their own service auth token. This lets them safely make these XRPC calls without requiring them to go through the rigmarole of the two layer OAuth flow.
- On that same note the proposal currently mentions "shared application sessions" as a pattern to avoid the two layer OAuth flow. However this, as the proposal mentions, would necessitate applications being the ones to implement the permissions. I feel this isn't a great approach to that problem space. Having applications implement permissions like that seems bound to result in permission bugs that could've been avoided, particularly in regards to when permissions change. I don't think the issue of having multiple people do their own two layer OAuth flow is big enough to warrant that kind of approach. And if it's specifically something we want to avoid I think the above option is better. Keeping the permission gate at the group host, as a single source of truth.
- One could argue that the
assignablefield is largely unnecessary. In Tranquil, while we don't have roles, you can still add other people and assign them permissions. The permissions you may assign to someone else are simply the permissions you yourself hold. Role assignment could easily do the same. I suppose it's to be able to give people a role that they aren't allowed to pass on? - Having roles as the only source of permissions seems a little limiting. I think being able to assign individual permissions directly a person would also be useful.
Group creation #
The proposal currently says, essentially, "OAuth with prompt=create at a group host`. That's not enough if you ask me. At the very least the creation flow should say something about wanting to create specifically a group account and not just any account. This is particularly warranted in cases where a service is a group host but also a standard PDS. eg. Tranquil will almost certainly become a group host since the opensocial covers more or less all the wants I have for what I've been calling "delegated accounts v2". Blocking setups like that at the spec level would be a big misstep if you ask me.
In Tranquil we currently offer account creation via Tranquil specific extensions to the normal createAccount flow. The createAccount flow is authenticated with another existing account and that account will then be the first member/controller of the delegated account once its created. This method is easy to use programmatically from an application and it covers getting the first member on to the account. I'm not saying it's necessarily a perfect method but I really don't think a basic prompt=create OAuth flow is enough. It needs to at least be distinguished from creation of standard atproto accounts.
Wording #
This ones a little more vague but the current wording of the proposal seems quite stuck on a few particular use cases while the actual tech here is much broader in potential use. Particularly the wording focuses a lot on spaces specifically. I think it's worth it to spell out more explicitly that this can absolutely also be used for collective control over an account and its "standard" atproto data not just spaces data. For example tangled has mentioned that they'll likely adopt it for org accounts once it's out and about (replacing the current temporary Tranquil based model). That use would primarily be for collective control over the public repo of the group/org account (even if putting those things in a public space would probably work too) and for auth purposes. This isn't really any technical objection, but I think optics are important. Even in technical documentation like specs, where the way something is presented main inadvertently limit the use cases people think of using it for.
Hi @nel.pet! Thanks for this feedback, and sorry to just see it and be replying to you now. Going to do short bullet-point replies:
include:com.atproto.authFullAccountwhich would be interpreted by the host as a special case. I think this could be added as an evolution/follow-up over time.createAccountAPI has been an anti-pattern (!) in that it made it hard for PDS operators and implementations to change how sign-up works.