Skip to content

Actors and RBAC

An actor is the subject of every permission check and every audit record. It is derived from token claims on each request, and it holds rights only where a role binding names it.

The forms an actor takes

Form Where it comes from
user:alice@acme.example An email claim on the verified token
sub:107107332738596210843 A sub claim, when no email is present
service-account:<workspace_uuid>:<service_account_id> A token issued for a service account
group:platform-engineering A groups, roles, or group claim, lowercased
system The fallback when no actor resolves

Email wins over subject when both are present. See Actors for the derivation path and Principal and group mappings for redirecting an external principal onto an internal actor.

From an actor to a decision

flowchart TB
  T["Verified token claims"] --> A["Actor id"]
  T --> G["Group claims"]
  A --> PR["Principal set"]
  G --> PR
  PR --> WR["Roles bound at the workspace"]
  PR --> OR["Roles bound at its organization"]
  WR --> U["Union of roles"]
  OR --> U
  U --> P["Permission set per role"]
  P --> D{"action in set,<br/>or set holds *"}
  D -->|yes| AL["Allowed"]
  D -->|no| F["403"]

The principal set is the actor plus its groups. Groups are lowercased and given the group: prefix, so a binding written against an uppercase group name matches nothing:

group_name = str(group or "").strip().lower()
principals.append(group_name if group_name.startswith("group:") else f"group:{group_name}")

Roles from both levels are unioned. A workspace check collects the roles each principal holds at the workspace and the roles it holds in that workspace's organization:

roles = get_actor_roles(workspace_uuid=workspace_uuid, actor_id=principal)
org_roles = get_actor_org_roles(organization_uuid=..., actor_id=principal)
combined_roles.extend(roles)
combined_roles.extend(org_roles)

An organization role therefore reaches every workspace in that organization, present and future. An organization check reads organization roles alone.

A principal with no role at the scope is refused. The permission set is empty, and the action carries the refusal:

403 forbidden: actor 'user:bob@acme.example' cannot perform 'run.read'
403 forbidden: actor 'user:bob@acme.example' cannot perform 'rbac.bind' on organization '6f2a7c3e-...'

Actions

Authorisation is per action string, and the roles below carry fixed sets of them.

Area Actions
Tenancy organization.create, organization.read, workspace.create, workspace.read
Access rbac.bind, bindings.create, bindings.read
Service accounts service_account.create, service_account.read, service_account.token.issue, service_account.token.revoke
Authoring flow.create, flow.read, capability.create, capability.read
Execution run.create, run.step, run.read, preflight.run
Governance policy.read, audit.read, approval.decide

organization.create resolves before any binding is read, so any actor the control plane resolves can create an organization and becomes its owner:

if action == "organization.create":
    return True

The system actor

system is the actor an unresolved request falls back to. It is authorised only when the request's auth context carries system_principal, which is how the control plane's own internal calls proceed. A CLI request that resolves to system is refused at every scope:

xratu auth whoami | jq -e '.actor_id != "system"' >/dev/null && echo "actor resolved"

Creation paths skip the automatic owner binding when the acting actor is system, which is why the first-install contract carries an explicit owner. See The owner role.

Properties

Authentication and authorisation are separate. A resolved actor with no binding authenticates, and holds organization.create alone until a binding names it.

Identity comes from the token on every request. Nothing is cached against a session, and the actor_id stored on a CLI profile is local metadata.

An actor is per provider. The same person arriving through two providers resolves to two actors unless a principal mapping joins them.

Next: Roles and bindings covers the five roles and how a grant is written.