Roles & access
Flat role-based access. Each role grants OAuth scopes, and a member can do whatever any of their roles allows. Reads are enforced per space; everything else is up to the app.
Flat RBAC
Authorization is flat role-based access control. A group defines many roles and gives each member one or more of them. Each role is granted a set of OAuth scopes on the group DID.
There are no deny rules or caveats, so authorization composes by taking the union of all scopes a member’s roles grant. There is no precedence, hierarchy or evaluation order. If any of your roles grants the scope for inviting, you can invite.
{
"$type": "group.opensocial.permissions",
"grants": [
{
"role": "admin",
"scopes": [
"include:group.opensocial.configure",
"space:*?manage=create", "space:*?manage=delete",
"space:*?collection=group.opensocial.access",
"rpc:group.opensocial.assignRoles?aud=*", "rpc:group.opensocial.ejectMember?aud=*",
"rpc:group.opensocial.createInvite?aud=*", "rpc:group.opensocial.admitMember?aud=*",
"rpc:group.opensocial.listSubjects?aud=*", "rpc:group.opensocial.resolveSubject?aud=*",
"rpc:group.opensocial.applyLabel?aud=*",
"space:*?collection=group.opensocial.label",
"repo:*"
],
"assignable": ["member"]
},
{
"role": "moderator",
"scopes": [
"rpc:group.opensocial.listSubjects?aud=*",
"rpc:group.opensocial.resolveSubject?aud=*",
"rpc:group.opensocial.applyLabel?aud=*"
],
"assignable": []
},
{ "role": "member", "scopes": [], "assignable": [] }
]
}
Roles are declared by role records in the members space and granted scopes by the single permissions record. repo: scopes are what a role may publish in the group’s public repo as the group.
Actions
The reference host’s methods ask about twelve actions. Each one guards a set of methods and is granted by one scope. A scope this table doesn’t name grants none of them.
| Action | Governs | Granted by |
|---|---|---|
mod.read |
See the moderation queue and subject histories. | rpc:…listSubjects |
mod.resolve |
Resolve or escalate a subject, add notes. | rpc:…resolveSubject |
label |
Apply and negate labels, except !hide and !takedown. |
rpc:…applyLabel |
takedown |
Apply and negate !hide and !takedown. Writing label records can say anything, so it grants label too. |
space:*?collection=…label |
invite |
Issue invites. | rpc:…createInvite |
admit |
Approve join requests. | rpc:…admitMember |
eject |
Remove a member, bounded by assignable. |
rpc:…ejectMember |
role.assign |
Grant and revoke roles, bounded by assignable. |
rpc:…assignRoles |
space.create |
Create a space under the group DID. | space:*?manage=create |
space.configure |
Change a space’s config, including its access record. |
space:*?collection=…access |
space.delete |
Delete a space. | space:*?manage=delete |
group.configure |
Edit the profile, rules, roles and permissions. | include:…configure |
Bounded actions
Two actions are parameterized by the roles they apply to: assigning a role and ejecting a member. A grant’s assignable list names the roles its holders may grant, revoke or eject. With assignable: ["member"], a role can make someone a member and eject members, but it can’t create another admin or eject one.
Role conventions
Roles may carry conventions. An app like Bluesky may treat roles named admin and moderator specially and show badges or extra controls for them. Other roles may just be flair. A group is free to ignore any convention.
Read access, per space
Every space has an access record listing the roles that may read it. The host enforces this: it only lets a reader into a space if one of their roles is listed.
{
"$type": "group.opensocial.access",
"readableBy": ["member"]
}
Everything else is the app’s
Who may write to a space, pin a thread, post in an announcements channel or create an event is modality-specific. These are app features, and each is declared in the modality’s own lexicon within its space. Those declarations can still refer to the group’s roles.
This is deliberate. The group standard can’t know what “pin” means in every app, but every app can say “only moderator may pin” using the same roles the group already has.