Skip to content

Workspaces

A workspace is the isolation boundary inside an organization, and the scope key for every other resource in the platform. Projects, flows, packages, builds, models, secrets, runs, policy attachments, and observability records are all addressed by workspace_uuid.

What the record holds

Field Source Constraint
workspace_uuid Generated at creation Unique, never supplied by you
organization_uuid Resolved from the organization you name Required; fixed at creation
name You choose it Unique within its organization, not globally
metadata You supply it Free-form JSON object, defaults to {}
created_at Server clock Set once

Two organizations may each hold a workspace called payments. The CLI therefore requires an active organization before it resolves a workspace name, and reports ambiguity rather than selecting one:

workspace name is ambiguous: payments (set organization first or use uuid)

A duplicate inside one organization is refused:

workspace name already exists in organization: payments

Where a workspace sits

flowchart TB
  O["Organization: acme"]
  O --> W1["Workspace: payments"]
  O --> W2["Workspace: risk"]
  W1 --> P1["Projects, flows, runs"]
  W1 --> S1["Secrets, models, bindings"]
  W1 --> E1["Audit, logs, evidence"]
  W2 --> P2["Projects, flows, runs"]
  W2 --> S2["Secrets, models, bindings"]
  W2 --> E2["Audit, logs, evidence"]
  O -.->|"catalog resolves<br/>across both"| W1
  O -.->|"catalog resolves<br/>across both"| W2

Solid edges are isolation. Dotted edges are the catalog exception described below.

What the workspace boundary does isolate

Every authored and executed artifact. A run in payments cannot be listed, read, replayed, or advanced from risk; its evidence, logs, and audit records are queried per workspace; its secrets, model bindings, and deployed projects are its own. Authorisation is checked against the workspace on each of these, and an actor bound only in risk gets a 403 in payments:

forbidden: actor 'user:alice@acme.example' cannot perform 'run.read'

What crosses the boundary

Three things cross it.

Published reusable capability blocks. Resolution collects every workspace in the organization and searches all of them, so a block published in risk is importable from payments. The organization is the library boundary; the workspace is not.

Organization-scoped role bindings. Workspace authorisation unions the actor's workspace roles with their roles in the workspace's organization:

roles = get_actor_roles(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 admin therefore has admin rights in every workspace of that organization, including ones created after the binding was made. An organization binding applies to the organization as a whole.

Audit fan-out. An organization audit query iterates the organization's workspaces and merges their records, so anyone with audit.read at organization scope reads across all of them.

Active scope and how the CLI resolves it

Most commands take no scope argument. They read the active context:

xratu config set organization acme
xratu config set workspace payments
xratu config view --show-ids

config set resolves the name against the API and stores both the name and the UUID, so the profile carries the identifier the transport needs while you keep typing the name. A per-command override is available on the commands that declare it, among them create, bind, delete, and auth get service-accounts:

xratu auth get service-accounts --workspace risk

get and describe read the active context. To use them against another workspace, change the active scope or keep a second profile for it.

When no workspace is set and the active organization holds exactly one workspace, that workspace is resolved automatically. Once a second workspace exists, the same command fails with:

workspace scope is required (set active context with `xratu config set workspace <name-or-uuid>` or pass --workspace)

Setting the scope explicitly from the start avoids this.

How many workspaces

An organization holds any number of workspaces, and an empty one consumes nothing. A workspace boundary produces one thing: a hard authorisation edge, so that actors bound in one workspace read only that workspace's runs, secrets, and evidence. Published code and organization-scoped bindings span the whole organization, as described above.

Lifecycle and placement

The API surface is create, get, and list, as it is for organizations. A workspace name is permanent. xratu delete operates on projects.

organization_uuid is fixed at creation. A workspace belongs to the organization it was created in for its whole life.

Policy attaches beneath the organization. Workspace attachments sit under organization attachments and can tighten them. See Organizations.