Skip to main content
This feature is in public preview.
SF Compute uses role-based access control (RBAC). A role is a named set of permissions that defines what actions the holder can perform. A grant assigns a role to a user or token within a workspace or across the organization. When a request arrives, SF Compute collects the caller’s grants, evaluates the rules from every matched role, and allows the action only if a rule matches. Otherwise it is denied. Role names are slugs, unique within the organization. Roles are organization-wide. The same role can be granted across multiple workspaces.

Creating a role

Write a role definition in TOML and pass it to the CLI.
api_version must be roles/v1. actions is a map from resource name to a list of verbs. Use "*" as either the verb or the resource for a wildcard. A role grants nothing on its own. Create a grant to assign it to a user or token.

Rule syntax

A rule says what a user or token is allowed to do. It has two pieces:
  1. An actions map, which pairs each resource (such as instance or pool) with a list of verbs (such as read or write).
  2. An effect that says what to do about those actions. Only allow is currently supported.

Supported resources and verbs

Resources: instance, instance_template, image, pool, secret, ssh_key, firewall, role, grant, token, billing, order, limits, user, * Verbs: read, write, delete, list, create, * Each rule covers every (resource, verb) pair you list. Use "*" as either the resource or the verb for a wildcard. Common patterns:
If no rule matches, the action is denied.

Built-in roles

SF Compute provides built-in roles that cover common patterns.
Built-in roles cannot be modified or deleted.

Admin role

Full access to all resources. Use sparingly.

Viewer role

Read-only access to all resources. Cannot make any changes.

Operator role

Full access to infrastructure resources — instances, instance templates, images, pools, secrets, firewalls, SSH keys, and more — with no access to IAM (roles, grants, tokens) and no broader read access.

Billing role

Access to billing and orders only. No infrastructure access. Good for finance teams.

Member role

Read and list access across non-sensitive resources, with no access to secrets, billing, tokens, or SSH keys. This is the default role users hold when they join an organization.

Listing and inspecting roles

Updating a role

Changes take effect immediately for all grants that reference this role. Existing sessions are re-evaluated on the next API call.

Deleting a role

Deleting a role removes it from any grants that reference it. This cannot be undone.

Example roles

CI/CD deployer

Can create and delete instances, read pools, manage no other resources.

Researcher

Can use existing infrastructure but not modify pools or access controls.

Finance

View billing data, manage budgets, and view orders. No infrastructure access.