Skip to content

Roles document

What each role grants and where it can be bound. Concept: access.

Applied with the rest of the config (concepts/config.md). Identity follows each change without a restart.

roles:
admin:
permissions: ["*"]
bindable_at: [organization, project, environment]
member:
permissions: [organization:read]
bindable_at: [organization]
developer:
includes: [member]
permissions: [project:read, project:write, project:bindings:read]
bindable_at: [organization, project, environment]
viewer:
includes: [member]
permissions: [project:read]
bindable_at: [organization, project, environment]
creator_role: admin

An example role set for organization > project > environment, where an environment’s routes require project:* permissions and its list_permission is project:read (kinds). It’s honest about grants: whoever holds bindings:write can grant any role, so the one role that holds it is admin, with *. admin also shapes the tree, creating and deleting projects and environments; developer and viewer work inside it.

Field Rule
roles Map of slug → role. At least one role
creator_role Required whenever roles is configured (forbidden when authorizer is configured without roles). What the creator of a node gets on it, where its kind binds its creator (bind_creator). Bindable at every kind
custom_roles Optional. Enables root-scoped custom roles managed through identity’s API alongside predefined roles (true, or { permissions: { … } } with catalog metadata and guardrails). Default false
permissions Optional map of permission → metadata (description, bindable_at, assignable) augmenting the permission catalog derived from routes, kinds, and predefined roles
Field Rule
slug [a-z][a-z0-9:._-]*, max 64. Starts with a letter so predefined slugs never collide with custom role ULIDs. Opaque to Plat5
display_name Optional human-readable name returned by identity’s roles API. Defaults to the role slug when omitted
description Optional human-readable description returned by identity’s roles API
permissions [a-z0-9:._-]+, max 64 chars, unique, max 64 permissions. ["*"] grants every permission; * is valid only alone. Forbidden when authorizer is configured, where the external PDP evaluates role permissions
includes Other roles included by this role, transitively. Without authorizer, this unions their permissions; with authorizer, the included role slugs are added to the resolved roles sent to the PDP. bindable_at stays the role’s own
bindable_at Required. The kinds this role can be bound at

Custom role permission metadata (custom_roles.permissions.<name>)

Section titled “Custom role permission metadata (custom_roles.permissions.<name>)”
Field Rule
description Optional human-readable description shown by the permissions catalog API
bindable_at Optional kinds where custom roles holding this permission may be bound. Omitted allows any kind
assignable Whether root custom roles may include this permission. Default true

A role grants its own permissions plus those of every role it includes. An included role that isn’t in roles, or a cycle of includes, is 422. A role may grant any permission, whether or not a route requires it: a service can check a permission no route names through identity’s evaluation API, and a misspelt one grants nothing.

Joining a root takes a role stated on the add or the invite, so default-deny below the root is the role you give new members: with member above, org members see no projects until a role is bound at a project, or at the org for all of them.

Built-in identity routes in services/identity.yml (generated routes) check <kind>:read, <kind>:write, <kind>:delete, and <kind>:bindings:read / <kind>:bindings:write. In particular, listing members (GET /<roots>/{root}/members), bindings, groups, service accounts, and security policy requires <kind>:bindings:read, so a role with only <kind>:read cannot call them unless you grant <kind>:bindings:read or edit the route in services/identity.yml.

The rules that tie roles to kinds and routes are checked at apply (concepts/config.md). Removing a role, or dropping a kind from its bindable_at, is safe: bindings keep the name and grant nothing, and grant again if a role with that name comes back. Don’t reuse a removed role’s name for something else.

When custom_roles is enabled (custom_roles: true or custom_roles: { permissions: { … } }), each root can also define its own ULID-keyed custom roles through identity’s API (reference/api/identity.md). Custom roles coexist with predefined roles and can hold any assignable permission from the catalog (never *). Use custom_roles.permissions to add descriptions, restrict bindable_at kinds, or exclude specific permissions from custom roles with assignable: false.