~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Group sessions get the tiers of a permission set their roles grant

Merged
Merged chadtmiller.com asked to merge into feature/proposal-nov from chadtmiller.com/group-host:oauth/permission-sets

An app signing in as a group now asks for one of three tiered permission sets, authManageProfile within authModerate within authManageGroup, and gets the parts of it the approving member's roles grant rather than all of it or nothing. A moderator approving an app that asks to run the group gives it moderation; a member who writes the profile by the meta space's policy gives it the profile.

Claude Opus 5.5 · low effort

What changes

Permission sets. fyi.opensocial.configure, manageSpaces, manageMembers and moderate are gone. In their place are the opensocial proposal's tiers, with its permissions, titles and details under our NSIDs: authManageProfile (profile and rules in meta), authModerate (memberships and labels in members, labels in meta, invites in inboxes, join requests, the moderation methods), and authManageGroup (all of that, plus labeler, roles, and manage=update on meta and members). listInvites sits in the two with the invite writes. participate is renamed authParticipate, keeping our getJoinRequest, getActorInvites and declineInvite. harness/lexicons.mjs retires the old ids.

Narrowing. A set is an upper bound. For each of the set's space permissions, the token keeps the collections the roles write there as the group, with the writes they hold. It keeps manage=update where they may change the space, invites where they hold invite, and each method where they hold its action. When what's kept is a whole tier, it's kept as that set, so the consent page names it. authParticipate is never kept for a group's session. A permission that both writes records and manages the space is made concrete as two scopes, so neither is lost to checks that read the two apart. getAuthorization's labels names a tier offered in place of the one asked for as well.

Roles. As a role's scope, authModerate carries admit, eject, role.assign, invite, label, mod.read and mod.resolve, and authManageGroup carries those and group.configure, which it now answers in place of configure. authManageProfile carries no action: the meta space's policy says who writes the profile and rules. Writes as the group in the meta space now go by that policy as well as by group.configure. A new group's admin carries include:fyi.opensocial.authManageGroup, space:*?collection=com.atproto.label.record, space:*?manage=update, space:*?manage=create&manage=delete, space:*?collection=* and repo:*. The invite action's scope is now the sets' own invites permission, so whoever holds a set can give invite. The seeded moderator carries authModerate and labels in every space.

Console, docs. The role editor's group.configure writes authManageGroup. invite writes the new scope. Signing in, membership, moderation and the command reference say all of this.

Why

The opensocial proposal tiered its sets on 19 Nov 2026 and made each an upper bound. Before this, a set was kept only if the roles held every action behind it. So a moderator approving a run-the-group app got nothing at all.

How it was checked

Tests were written first. oauth_scope covers each tier kept whole for an admin. A moderator asking authManageGroup gets authModerate. A profile writer (by the meta policy) gets authManageProfile from either tier and nothing from authModerate. A doorkeeper's and a steward's partial parts come back as scopes. authParticipate is never kept, for admin, moderator or member. A profile writer's token writes the profile but not the labeler, and the set is made concrete as split scopes. authorization covers the offer page giving a moderator authModerate for authManageGroup, with both labelled. rbac covers what each set carries, and groups covers a new group's admin scopes. The rest is left to CI.

Shortcomings

  • A role carrying include:…authManageGroup shows every moderation action ticked in the role editor. Unticking one there doesn't take it away while the set stays.
  • label from authModerate counts in every space, as any label action does, though the set's own label scopes name only meta and members.
Approved

This replaces the four old permission sets with the three tiers (authManageProfile within authModerate within authManageGroup). It narrows each requested set to the parts the approving member's roles grant. It also moves the meta-space write check onto the policy plus group.configure.

I read the narrowing in oauth_scope.rs (parts, written, scopes_of), rbac.rs, token_writes.rs, authorization.rs, group.rs, lexicons.rs, and the three new lexicons. I did not read the tests, docs, harness/lexicons.mjs, crates/opensocial, web/src/lib/actions.ts, the authParticipate lexicon change, or the deleted lexicons.

The logic holds together:

  • A tier is kept whole only when what the roles grant exactly equals its scope list, and otherwise comes back as the individual scopes.
  • meta_writes and token_writes agree on who writes the meta space.
  • Every method the sets list has an entry in ASKS, so a whole tier is reachable.

Checks: check, lexicons, docs and web pass. test and e2e were still running when I looked, and the pull's own description leaves the rest to CI. Confirm they go green, since the 100% coverage gate applies to the new branches in parts and written.

The two shortcomings the body names are accepted tradeoffs and don't block this.

Approved

The only change since my approval is in the test configures_the_group_as_its_methods_would. The negative case now writes a acceptance record instead of membership. That fits the new sets, since they name membership and so would no longer return 403. It still checks that a record the set doesn't name is refused, and the code is unchanged, so my earlier approval stands. The checks for this commit are all queued. Please confirm they go green, including the coverage gate on test.

Merged as 8b367e0