Skip to content

Authorizer

Optional external OpenID AuthZEN 1.0 policy decision point (PDP) such as Topaz, Cerbos, OpenFGA (with AuthZEN adapter), or a custom PDP.

Authorization in Plat5 is configured with two composable top-level blocks — roles and authorizer (at least one must be set):

  • roles only — roles (with permissions) + creator_role. Plat5 stores role bindings and evaluates decisions.
  • authorizer + roles — authorizer + roles (with bindable_at and optional includes, no permissions, no custom_roles) + creator_role. Plat5 stores bindings, groups, invites, and creator_role (kinds.<k>.bind_creator), resolves the member’s roles at the target node, and delegates policy evaluation to the external AuthZEN PDP (such as Cerbos or OPA).
  • authorizer only — no roles, creator_role, custom_roles, roles_property, or kinds.<k>.bind_creator. The external PDP (such as Topaz, OpenFGA, or SpiceDB) owns both assignments/relationships and decisions.

In all configurations, Plat5 handles authentication, slug-to-ULID resolution, membership, org security policies, credential scopes, rate limiting, and audit.

Runtime PDP wiring (AUTHORIZER_URL, AUTHORIZER_TOKEN, AUTHORIZER_TIMEOUT, AUTHORIZER_CACHE_TTL, AUTHORIZER_NEGATIVE_CACHE_TTL) belongs to the gateway and identity process environment (reference/env.md), never control-plane config revisions.

# External PDP owning both assignments and policy (e.g. Topaz / OpenFGA)
authorizer:
mode: authzen
# External PDP with Plat5-stored `roles` (e.g. Cerbos) — combine with top-level `roles` (without `permissions`) and `creator_role`
authorizer:
mode: authzen
roles_property: cerbos.roles
Field Rule
authorizer External OpenID AuthZEN 1.0 PDP configuration. Combine with roles + creator_role (without permissions or custom_roles) so Plat5 stores bindings and passes resolved roles to the PDP, or omit roles to leave both assignments and policy to the PDP
mode External authorization protocol. Currently only authzen (OpenID AuthZEN 1.0). Runtime PDP wiring (AUTHORIZER_URL, AUTHORIZER_TOKEN, AUTHORIZER_TIMEOUT, AUTHORIZER_CACHE_TTL, AUTHORIZER_NEGATIVE_CACHE_TTL) belongs to gateway and identity process environment
roles_property Optional dot-separated path inside AuthZEN subject.properties where Plat5 places the member’s resolved role slugs when authorizer is combined with roles. Defaults to roles. Example: cerbos.roles produces {"cerbos": {"roles": [...]}}. Valid only when roles is configured; the top-level segment cannot be root_id or member_type

By default, the gateway checks every kind-scoped route against its scope node ({ "type": "<scope_kind>", "id": "<leaf_node_id>" }) using the route’s permissions as AuthZEN action names. To check a specific record inside a node, set resource: { type, id } on the route or verb:

Field Rule
type AuthZEN resource.type name (e.g. document)
id AuthZEN resource.id template (e.g. {doc_id} or {project.id}:{doc_id})
- path: /documents/{doc_id}
resource: { type: document, id: "{project.id}:{doc_id}" }
methods:
GET: { permissions: docs:read }
PATCH: { permissions: docs:write }
DELETE: { permissions: docs:delete }

Plat5 calls POST {url}/access/v1/evaluation for a single action and POST {url}/access/v1/evaluations for multi-permission OR routes (evaluations_semantic: "permit_on_first_permit"), POST /access/routes UI checks, and identity node-list filtering (evaluations_semantic: "execute_all").

  • Subject: { "type": "member", "id": "<member_id>", "properties": { "root_id": "<root_id>", "member_type": "user" | "service_account" } }. When roles is also configured, Plat5 places the member’s resolved role slugs (including ancestor bindings, groups, and transitive includes) at roles_property (dot-nested under subject.properties; default roles, e.g. cerbos.roles → {"cerbos": {"roles": [...]}}), and denies immediately without calling the PDP if the member holds zero roles on the target node.
  • Resource: Defaults to { "type": "<scope_kind>", "id": "<leaf_node_id>" } (or the route’s resource: { type, id } template filled with resolved IDs and route params), with properties carrying root_id, <kind>_id for each chain node, and nodes.
  • Action: Each permission in the route’s permissions (for kind list filtering in identity, the kind’s list_permission). Gateway requests also include action.properties: { "method": "<HTTP_METHOD>", "route": "<route_template>" }.
  • Context: Gateway requests include client_ip, request_id, and matched route params.
  • Fail closed: Timeouts, transport errors, HTTP redirects, non-2xx responses, or invalid JSON return 503 SERVICE_UNAVAILABLE. A decision: false takes the same uniform 403 path (and failed-auth IP limiter) as built-in RBAC.
  • Credential scopes: If a key or JWT is scope-narrowed, only actions permitted by the credential’s scopes can succeed; an external PDP can never widen a narrowed credential.
  • Caching: AUTHORIZER_CACHE_TTL and AUTHORIZER_NEGATIVE_CACHE_TTL default to 0s (immediate consistency, no cache). Set short TTLs (for example 2s–5s) on high-traffic read endpoints when a few seconds of staleness is acceptable.