Skip to content

Roles and bindings

A role is a fixed set of permitted actions. A binding grants one role to one principal at one scope. Together they are the whole of what an actor may do.

The five roles

Role Permissions
owner *, every action at the scope
admin *, every action at the scope
operator Create and read organizations, workspaces, service accounts and tokens; bind roles; create, step and read runs; read flows, policy, audit, capabilities and bindings; run preflight; decide approvals
developer Create and read flows, capabilities, bindings, workspaces, organizations, service accounts and runs; issue service-account tokens; bind roles; read policy and audit
viewer Read organizations, workspaces, runs, flows, policy, audit, service accounts, capabilities and bindings

owner and admin resolve to the same permission set. owner is the role the control plane writes for you when you create an organization or a workspace.

Three roles carry rbac.bind: operator, developer, and the two * roles. An actor holding one of them can bind any role at that scope, including a higher one for themselves. viewer is the role that holds read actions only.

What a binding is

A binding is identified by its scope, its actor and its role together.

Part Values
Scope One organization, or one workspace
Actor user:, sub:, group:, or service-account: form
Role One of the five names above
xratu bind role developer --to user:bob@acme.example --workspace payments
xratu bind role admin     --to group:platform-engineering --organization acme
POST /v1/rbac/bindings
POST /v1/rbac/organization-bindings

One scope flag applies per command. Passing both is refused before a request is sent:

bind role must target either organization or workspace scope, not both

With neither flag, the active workspace from the profile is used, which produces a workspace binding.

Reach

flowchart LR
  OB["Organization binding<br/>acme + actor + role"] --> W1["Workspace payments"]
  OB --> W2["Workspace risk"]
  OB --> W3["Workspaces created later"]
  WB["Workspace binding<br/>payments + actor + role"] --> W1

An organization binding is read by every workspace check in that organization, including workspaces created after it was written. A workspace binding is read by that workspace alone.

Bindings accumulate

A second bind for the same actor adds a grant alongside the first, and authorisation unions every role the principal holds at the scope. Two consequences follow.

A lower role added later raises nothing and removes nothing. An owner who is later bound viewer holds both, and * decides.

A binding stands for the life of the scope. The binding surface is the two write endpoints above. Grant the narrowest role that lets the actor work, and revoke access by revoking credentials. See Token lifetime, renewal, and revocation.

Role names are matched when a request is authorised

The bind path lowercases the role and records it. Authorisation matches that name against the five recognised names, so a misspelled role records a binding that resolves to an empty permission set:

xratu bind role developr --to user:bob@acme.example --workspace payments
{
  "status_code": 200,
  "body": {
    "status": "accepted",
    "workspace_uuid": "b91d4f07-2c65-4e13-8a77-05ce9d2b6f38",
    "actor_id": "user:bob@acme.example",
    "role": "developr"
  }
}

The same applies to the principal side: group names and emails are lowercased when principals are built from claims, so a binding written with different case is compared against a principal that has been lowercased.

Ownership is a binding

Ownership is held in bindings rather than on the organization or workspace record, so a scope has as many owners as have been bound. See The owner role.

To grant access, see Bind additional RBAC.