Skip to content

Platform Roles & Actions

RoleDescription
platform_adminFull access to all platform operations. Wildcard (*) permission.
platform_operatorTenant management, full impersonation (read + write), read access to users, keys, and roles.
platform_viewerRead-only access to all platform resources.

The three built-in platform roles are seeded by migration into org_platform. Custom platform roles can be created — see Platform RBAC.

Built-in protection gap

Today the delete/update protection check gates on the is_default flag, and the platform built-ins are seeded with is_default=0. They are effectively unprotected at the handler level. Track issue: built-in platform roles should be either seeded with is_default=1 or guarded by an explicit ID allowlist (matching the tenant role handler).


ActionDescription
platform:users:readList and view platform users
platform:users:manageCreate, update, and delete platform users
platform:keys:readList and view platform API keys
platform:keys:manageCreate, rotate, and delete platform API keys
platform:roles:readList and view platform roles and policies
platform:roles:manageCreate, update, and delete custom roles and policies
platform:tenants:readList and view tenant organizations
platform:tenants:manageProvision and delete tenant organizations
platform:impersonate:readRead-only impersonation of tenant orgs (GET, HEAD, OPTIONS)
platform:impersonateWrite access to tenant orgs (POST, PUT, DELETE)
platform:audit:readQuery the platform audit log
platform:policies:readList and view platform policies
platform:policies:manageCreate, update, and delete platform policies

ActionAdminOperatorViewer
platform:users:readYesYesYes
platform:users:manageYes
platform:keys:readYesYesYes
platform:keys:manageYes
platform:roles:readYesYesYes
platform:roles:manageYes
platform:tenants:readYesYesYes
platform:tenants:manageYesYes
platform:impersonate:readYesYesYes
platform:impersonateYesYes
platform:policies:readYes
platform:policies:manageYes
platform:audit:readYesYesYes

The platform middleware maps HTTP methods and paths to actions:

Path PatternGETPOST/PUT/DELETE
/api/v1/platform/users*platform:users:readplatform:users:manage
/api/v1/apikeys?platform=trueplatform:keys:readplatform:keys:manage
/api/v1/platform/roles*platform:roles:readplatform:roles:manage
/api/v1/platform/policies*platform:policies:readplatform:policies:manage
/api/v1/platform/tenants* (or /api/v1/platform/orgs*)platform:tenants:readplatform:tenants:manage
/api/v1/platform/audit*platform:audit:readplatform:audit:read
/api/v1/platform/auth*(public)(public)

Notes:

  • Platform API keys are listed/managed through the tenant /api/v1/apikeys route with ?platform=true; the action is selected inline by the apikey handler (platform:keys:read for GET, platform:keys:manage otherwise).
  • The audit path maps to platform:audit:read for any HTTP method. Only GET routes are registered today, so non-GET requests 404 before authz runs.

For impersonation (non-platform endpoints with X-Ironflow-Org header):

HTTP MethodRequired Action
GET, HEAD, OPTIONSplatform:impersonate:read
POST, PUT, DELETEplatform:impersonate

ResourcePrefixExample
Platform userpuser_puser_a1b2c3d4
API key (all types)ak_ak_e5f6g7h8
Role (built-in)role_role_platform_admin
Role (custom platform)prole_prole_a1b2c3d4
Policy (unified)pol_pol_def456
Tenant (organization)org_org_x1y2z3w4
Platform key valueifplatform_ifplatform_a1b2... (43 chars)
Tenant key valueifkey_ifkey_a1b2... (38 chars)