chadtmiller.com/group-host
atmosphere group host
Apps make groups for people and leave with a session on them
MergedThis adds provisionGroup. The founder signs in with service auth. The app signs in with its client id (and its assertion, if confidential) and a DPoP proof. The trusted-client list and the scope are checked, the group is made, and a session narrowed to the founder's roles is issued as an ordinary grant. The token-issuing code is shared with the token endpoint, and new_group is shared with createGroup. The extraction in oauth.rs keeps the behaviour of the code exchange.
I found nothing that must change. The checks are done in a sensible order, and the lexicon, config reference, design docs and tests all come with it. I did not read the checks' output.
One small point: the "checked before the group is made" claim does not cover roles, narrow and issue_grant, which run after create_group. If one of them fails with an internal error, the group exists and the caller gets an error with no session. The founder can still use the group, so this is tolerable, but you could note it in the docs or add cleanup later.
What changes
Provisioning (
provision.rs,provisionGroup). An app makes a group for someone and leaves with its own session on it. Two parties sign in:The app must be one this host makes groups for:
PROVISIONING_CLIENTS, comma-separated client ids or*, none by default. Its scope must holdatprotoand nothing its metadata doesn't declare (InvalidScope). All of that is checked before the group is made.The session is issued as a code exchange issues one, narrowed to the founder's roles as an approval is, and recorded as the founder's. From then on it is an ordinary grant: refreshed at
/oauth/token, listed among the group's with sourceprovisionGroup, and revoked there.The token endpoint's issuing is now shared with provisioning (
issue_grant,new_tokens,token_response), andcreateGroup's body is read by one function both use (new_group).Why
Step 6's last part: an app can set up a group for someone in one step. With it, step 6 (signing in) is done.
What changed from the prototype:
How it was checked
tests/provision.rs:clientId, no service auth, no proof;atproto, undeclared, and narrowed;tests/config.rsreadsPROVISIONING_CLIENTS. These portprovision.test.ts. Local coverage is 100% of lines and functions.