Several Tenants
For a deployment with more than one customer, to see where a document's reach ends. This page puts three tenants on one platform and shows three facts, each a scenario that runs on every build: a platform policy reaches every tenant, a tenant's binding reaches only its own principals, and a boundary can cap what one tenant may be permitted.
What you need
| Several tenants | |
|---|---|
| Documents | One platform document, and one tenant document each for acme, globex and initech |
| Tokens | Each principal's token carries its tenantId: a principal is evaluated only against its own tenant's document |
| Concepts | Tenant, Platform boundary, Tenant isolation |
The documents
The platform document holds what every tenant shares: one policy, bound to everyone, and two boundaries. boundary-standard is the default and lets GET and POST on /api/** stand; boundary-read-only lets only GET stand.
{
"schema": 2,
"revision": 1,
"publishedAt": "2026-11-01T08:00:00Z",
"boundaries": {
"default": "boundary-standard"
},
"policies": [
{
"id": "read-orders",
"statements": [
{
"name": "read-orders",
"effect": "allow",
"action": "http:GET",
"resource": "http:path:/api/orders"
}
]
},
{
"id": "boundary-standard",
"boundary": true,
"statements": [
{
"effect": "allow",
"action": [
"http:GET",
"http:POST"
],
"resource": "http:path:/api/**"
}
]
},
{
"id": "boundary-read-only",
"boundary": true,
"statements": [
{
"effect": "allow",
"action": "http:GET",
"resource": "http:path:/api/**"
}
]
}
],
"bindings": [
{
"id": "read-orders",
"subject": "*",
"app": "*",
"space": "*",
"policy": "read-orders"
}
]
}acme binds its own policy to everyone, in its own document. It lets a principal of acme POST /api/export:
{
"schema": 2,
"revision": 1,
"publishedAt": "2026-11-01T08:00:00Z",
"policies": [
{
"id": "acme-export",
"statements": [
{
"name": "export",
"effect": "allow",
"action": "http:POST",
"resource": "http:path:/api/export"
}
]
}
],
"bindings": [
{
"id": "acme-export",
"subject": "*",
"app": "*",
"space": "*",
"policy": "acme-export"
}
]
}globex binds the same kind of policy, and names boundary-read-only as the boundary that holds it:
{
"schema": 2,
"revision": 1,
"publishedAt": "2026-11-01T08:00:00Z",
"boundary": "boundary-read-only",
"policies": [
{
"id": "globex-export",
"statements": [
{
"name": "export",
"effect": "allow",
"action": "http:POST",
"resource": "http:path:/api/export"
}
]
}
],
"bindings": [
{
"id": "globex-export",
"subject": "*",
"app": "*",
"space": "*",
"policy": "globex-export"
}
]
}initech has a document and nothing in it, so only what the platform grants everyone reaches it:
{
"schema": 2,
"revision": 1,
"publishedAt": "2026-11-01T08:00:00Z"
}Check it
The scenarios in wiki/examples/several-tenants run on every build:
| Caller | Request | Result |
|---|---|---|
alice of acme | GET /api/orders | Permit: the platform policy read-orders is bound to everyone |
gina of globex | GET /api/orders | Permit: the same policy, for another tenant |
alice of acme | POST /api/export | Permit: acme's own binding |
ivan of initech | POST /api/export | Deny, implicit: the binding is in acme's document, and initech's has none |
gina of globex | POST /api/export | Deny, by the boundary: globex binds the permit, but boundary-read-only has no statement for POST |
What each says:
- A platform binding is every tenant's. The platform document applies to all principals, whatever their tenant; put in it only what every tenant may have.
- A tenant's binding stays in its tenant. A principal is evaluated against its own tenant's document, so
acme'sAnyonebinding means "anyone inacme", never anyone ininitech. Tenants cannot see or change each other's documents (Tenant isolation). - A boundary caps; it never grants. A permit stands only if a statement of the tenant's boundary also matches. Use it for a ceiling the platform sets whatever a tenant writes, such as a tenant on a read-only plan.