Skip to content

Tenant scope

tenant_scope is the organization, in the form the runtime lane uses. It carries the organization UUID, and it travels with dataplane_pool as a pair from the moment a node is invited to the moment an assignment is claimed.

tenant_scope = _text(workspace.get("organization_uuid"))

Where the pair appears

flowchart TB
  O["Organization acme<br/>organization_uuid"]
  O -->|"as tenant_scope"| P["Pool record<br/>tenant_scope + dataplane_pool"]
  P --> I["Invitation"]
  I --> E["Enrollment<br/>metadata carries the pair"]
  E --> R["Runtime registration<br/>compared against the enrollment"]
  E --> S["Scheduler capability<br/>tenant_scope, pool, node id"]
  S --> AS["Assignment envelope<br/>dispatch_scope"]

Every comparison along that path is exact equality on both halves, so a pool name means something only alongside the organization it belongs to.

Resolved dispatch scope

A node's dispatch scope is resolved from its runtime identity and its active enrollment:

{
  "contract_version": "dispatch.tenancy_scope.v1",
  "deployment_mode": "shared",
  "scope_required": true,
  "dataplane_uuid": "3f9c1b02-6f7a-4c1e-9a55-0d2e7b41c8ad",
  "dataplane_instance_uuid": "0b7e2a91-54c3-4f18-bb60-9c1d3a5e7f24",
  "tenant_scope": "6f2a7c3e-1b54-4a29-9f0d-7c83b1e5a412",
  "dataplane_pool": "edge-eu"
}
Field Meaning
deployment_mode dedicated or shared, from the tenancy policy
scope_required Whether the pair filters what this node reaches
dataplane_uuid Read from the runtime credential's claims
tenant_scope The organization on the node's active enrollment
dataplane_pool The pool on the same enrollment

The two profiles

The profile follows from the tenancy policy recorded at bootstrap reconcile:

if max_tenants <= 1 and max_active_dataplanes_per_tenant <= 1:
    return {"scope_required": False, "profile": "dedicated"}
return {"scope_required": True, "profile": "shared"}

Dedicated. One organization and one node per organization. The pair is carried on records and dispatch resolves with scope_required false.

Shared. Several organizations or several nodes per organization. The runtime credential must carry dataplane_uuid, the active enrollment supplies the pair, and workspace targets are filtered to workspaces whose metadata carries the same pair.

Scope on an assignment

In the shared profile an assignment envelope carries the pair it was stamped with, and a node compares it against its own scope before acting:

{
  "assignment": {
    "dispatch_scope": {
      "tenant_scope": "6f2a7c3e-1b54-4a29-9f0d-7c83b1e5a412",
      "dataplane_pool": "edge-eu"
    }
  }
}

A stamped assignment whose pair differs from the claiming node's scope is refused rather than executed.

Reason codes

Code Status Condition
DISPATCH_SCOPE_RUNTIME_IDENTITY_REQUIRED 403 Shared profile, and the credential carries no dataplane_uuid
DISPATCH_SCOPE_ENROLLMENT_NOT_ACTIVE 403 No active enrollment supplying both halves of the pair
DISPATCH_SCOPE_WORKSPACE_TARGET_MISSING 409 No workspace metadata matches the node's pair
DISPATCH_SCOPE_MISSING 409 The assignment carries no dispatch_scope in the shared profile
DISPATCH_SCOPE_MISMATCH 409 The assignment's pair and the node's scope differ

A node reporting DISPATCH_SCOPE_WORKSPACE_TARGET_MISSING is enrolled and registered; the workspace it should serve carries a different pair in its metadata, or none.