Roles & RBAC¶
b'nerd uses a preset-based RBAC model. Permissions are tied to a membership — the join between an account and an organization. An account that belongs to multiple organizations holds a separate membership in each, with independent role and permissions per organization. The same account can be an Admin in one organization and a read-only viewer in another.
The permissions evaluated for a given request are those of the membership that matches the request's ?organization_id. See Organization context for how the server resolves which membership to use.
Roles¶
| Role | Description |
|---|---|
| Admin | Full access to all resources within the organization. Bypasses per-category permission checks. |
| Member | Access limited to the explicit permissions on their membership for that organization. |
There are always at least two accounts with the Admin role in a healthy organization — the platform prevents you from removing the last admin.
Deny-by-default for Members
Access for Member accounts is fail-closed: a category not listed in the membership's permissions is denied, even for reads. There is no implicit read grant — every access a Member has must be explicitly granted. Use the built-in presets (below) to provision a working permission set quickly.
Permission categories¶
Each membership carries permissions across ten categories:
| Category | Controls access to |
|---|---|
projects | Create, update, and delete projects |
openstack | Compute (VMs, volumes, networks, etc.) |
garden | Kubernetes (Gardener-managed clusters) |
rgw | Object storage (RGW users, buckets) |
apps | DPF applications |
billing | Invoices, subscriptions, payment methods |
members | Invite, update, and remove organization members |
settings | Organization settings |
alerts | Alert routes, escalation chains/steps, on-call rosters, and ingest tokens — see the Alerting & Escalation API |
features | Submitting feature-access requests on behalf of the org without waiting for an admin — see Requesting Feature Access |
Actions within a category: read, create, update, delete. The members category also has an invite and remove action; features has a single request action.
Built-in presets¶
Apply a preset with POST /memberships/{id}/apply_preset and { "preset": "<name>" }.
admin¶
Full read/write on all categories. Even though admins bypass permission checks via their role, the preset populates permissions for UI clarity and audit trail.
| Category | Actions |
|---|---|
projects | read, create, update, delete |
openstack | read, create, update, delete |
garden | read, create, update, delete |
rgw | read, create, update, delete |
apps | read, create, update, delete |
billing | read, update |
members | read, invite, update, remove |
settings | read, update |
alerts | read, create, update, delete |
developer¶
Read/write on infrastructure and apps. Cannot manage billing, members, or settings.
| Category | Actions |
|---|---|
projects | read, create, update |
openstack | read, create, update |
garden | read, create, update |
rgw | read, create, update |
apps | read, create, update, delete |
billing | read |
members | read |
settings | read |
alerts | read, create, update |
operator¶
Read-only on most resources; can update (but not create/delete) compute, Kubernetes, and apps. No write access to billing, members, or settings.
| Category | Actions |
|---|---|
projects | read |
openstack | read, update |
garden | read, update |
rgw | read |
apps | read, update |
billing | read |
members | read |
settings | read |
alerts | read, update |
viewer¶
Read-only across all categories. Suitable for stakeholders who need visibility without any write access.
| Category | Actions |
|---|---|
projects | read |
openstack | read |
garden | read |
rgw | read |
apps | read |
billing | read |
members | read |
settings | read |
alerts | (none) |
billing_manager¶
Read-only on infrastructure; can read and update billing. Suitable for finance team members.
| Category | Actions |
|---|---|
projects | read |
openstack | read |
garden | read |
rgw | read |
apps | read |
billing | read, update |
members | read |
settings | read |
alerts | (none) |
alerts is deny-by-default, unlike the other read-everywhere categories
Every other category grants at least read on viewer/billing_manager. alerts is the one exception: those two presets grant no alerts access at all, so paging configuration and alert history stay invisible until explicitly granted (apply_preset to admin/developer/operator, or a custom PATCH .../memberships/{id} — see Custom permissions). This mirrors the Alerting API's RBAC.
Applying a preset via the API¶
POST /memberships/{id}/apply_preset
Authorization: Bearer <token>
Content-Type: application/json
{ "preset": "developer" }
Returns the updated membership with the new permissions. Applying a preset overwrites all existing permissions on that membership.
Listing available presets¶
Returns a map of all preset names to their permission hashes.
Custom permissions¶
Presets are a starting point. You can update individual permissions without applying a preset:
PATCH /memberships/{id}
Authorization: Bearer <token>
Content-Type: application/json
{
"membership": {
"permissions": {
"rgw": ["read", "create"],
"billing": ["read"]
}
}
}
Only the categories you include are updated — categories you omit are left unchanged.
Project-level membership grants¶
Beyond the organization-level role and permissions, a Member account can receive project-level grants that give them specific capabilities on a single project. This lets you provision a project admin or scoped collaborator without elevating them across the entire organization.
Project-level grants are bounded by the account's organization-level ceiling: you cannot grant a project capability the account's org membership does not also permit.
Endpoints¶
| Method | Path | Description |
|---|---|---|
GET | /projects/{project_id}/memberships | List all grants for a project |
POST | /projects/{project_id}/memberships | Grant an account project-level permissions |
GET | /projects/{project_id}/memberships/{id} | Show a single grant |
PATCH | /projects/{project_id}/memberships/{id} | Update a grant's role or permissions |
DELETE | /projects/{project_id}/memberships/{id} | Remove a grant |
Roles on a project grant¶
| Role | Effect |
|---|---|
Member | Access limited to the explicit permissions in this grant. |
Admin | Full project-admin — can manage project memberships and all resources in this project. Only Org Admins may assign this role. |
Who can manage project grants¶
- Org Admins can create and modify any project grant in their org.
- Org members with
members:invitecan grant project access (bounded by their own org ceiling). - Delegated project admins (accounts with
role: Adminon a project grant) can grant access on that specific project — they cannot grant more capabilities than they themselves hold, and cannot assign the project Admin role.
Example: grant a developer access to one project¶
POST /projects/{project_id}/memberships
Authorization: Bearer <token>
Content-Type: application/json
{
"project_membership": {
"account_id": "<uuid>",
"role": "Member",
"permissions": {
"openstack": ["read", "create", "update"],
"apps": ["read", "create"]
}
}
}
Returns 201 Created with the new grant. The grantee's org membership is unchanged.