Roles & Permissions
Loxtep uses a role-based access control (RBAC) system to govern what users can see and do. Permissions are enforced at the API level and in the UI (navigation visibility, page guards, action buttons).
How Permissions Work
Every permission follows a resource:action pattern (e.g., data_products:create, workflows:execute, billing:read). Users gain permissions through role assignments — a user can hold one or more roles, and their effective permissions are the union of all assigned roles.
Check your current roles and effective permissions with loxtep_session → get_current_user on the hosted MCP server, or client.session.get_current_user() in the Node or Python SDK:
{ "operation": "get_current_user" }
Enforcement layers
| Layer | Mechanism | Effect |
|---|---|---|
| API | Auth reloads permissions from the database on every request, then RBAC checks resource:action against those permissions. Role-permission maps sit behind a 5-minute cache. If the reload fails, the request is refused; JWT claims are never used instead. Sign-in or authorization errors stay 401/403, and every other failure returns HTTP 503 PERMISSION_RELOAD_FAILED. | Returns 403 Forbidden if denied |
| Navigation | Sidebar items declare required permissions; hidden when unmet | User never sees links they can't use |
| Page guards | PermissionGate component blocks content | Shows "Insufficient permissions" message |
| Actions | UI actions conditionally rendered based on permissions | Buttons hidden or disabled |
A 503 PERMISSION_RELOAD_FAILED means Loxtep could not read your permissions from its database for that request. It is temporary and does not mean your access changed or your session expired: retry later. See the status code table.
Permission hierarchy
The RBAC engine supports an action hierarchy:
* → manage → delete → update → create → read
For example, data_products:manage implicitly satisfies a check for data_products:read. discover, write, and admin are not in this hierarchy, so entity:admin and entity:write do not satisfy a check for entity:discover or entity:read.
System Roles
Loxtep ships 3 system roles. Every organization shares them, so you cannot delete them or change their name, description, or permissions from your organization. To change what a system role allows, duplicate it into a custom role and edit that instead. Platform admins can edit a system role in the platform admin console (see Platform admin console).
Loxtep refuses each change to a system role from your organization with 403:
| Action | error.message |
|---|---|
| Editing a system role's name, description, or permissions | Cannot modify system roles via the organizations API; system roles are shared by every organization |
| Adding a permission to or removing one from a system role | Cannot modify system roles via API |
| Deleting a system role | Cannot delete system roles |
| Role | Description |
|---|---|
| Admin | Full org access — billing, users, settings, all resources |
| Engineer | Build, deploy, manage data products, workflows, entities, and AI tools |
| Viewer | Read-only access including entities, plus analytics query and pipeline execution |
Defaults
- New users joining an organization are assigned Viewer.
- First user (org creator) is assigned Admin.
- Custom roles can be created by duplicating any system role.
Role Details
Admin
The single administrative role for an organization. Full access to everything including billing, user management, governance, and system settings.
Key capabilities:
- User management: invite, create, update, delete users
- Role management: create custom roles, assign/remove roles
- Billing: manage payment methods, subscriptions, invoices, plans
- All data product, workflow, deployment, entity, and governance operations
- Organization settings and security configuration
- Full AI and agent orchestration access
- Instance upgrades: run now, schedule, cancel schedule, and set upgrade mode (
instances:admin)
Engineer
The primary builder role. Can create, modify, and deploy everything needed to build data products and pipelines.
Key capabilities:
- Data products: full CRUD + export + admin
- Entities: discover, read, write, and admin
- Workflows: full lifecycle including execute and configure
- Deployments: create, execute, approve, reject, rollback
- Connections, connectors, schemas, templates: full CRUD
- AI tools: chat, MCP tools, schema inference, recommendations
- Agent orchestration: read and write
- Ontology and procedures: create, read, update
- Quality rules: read and write
- Instances: read and update (Observe cron, approvals, event settings). Not create, delete, or upgrade.
Cannot: Manage users/roles, manage billing, create or delete instances, change upgrade_mode, or run or schedule instance upgrades (instances:admin).
Viewer
Read-only access with the ability to run analytics queries and execute pre-built pipelines.
Key capabilities:
- Read access across all resources (data products, workflows, catalog, governance, etc.)
- Discover and read entities
- Execute pre-built workflows and bots
- Run analytics queries (
analytics:query) - Use AI chat
- Create access requests and contract requests
- Execute and rollback deployments
Cannot: Create, update, or delete any resources. Cannot manage users, roles, or billing.
Page & Feature Access
The primary rail follows the customer journey. Feature flags control whether a journey area is available; permissions still govern the resources and actions inside each area.
Main navigation sections
| Area | Representative permissions |
|---|---|
| Connect | connectors:read, connector create/update permissions |
| Products | data_products:read, projects:read, workflow and deployment permissions |
| Meaning | catalog:read, domains:read, semantic and ontology permissions |
| Use | analytics:read, catalog:read, data_products:read |
| Observe | observe:read, quality:read, contracts:read |
| Inbox | approval, request, and issue permissions for the item being reviewed |
Organization
| Page | Required Permission |
|---|---|
| Dashboard | organizations:read |
| Agent Orchestration | agent_orchestration:read |
| Team (Users & Roles) | users:read |
| Governance | governance:read |
| Settings | organizations:read |
| Settings → Security | permissions:admin or roles:assign |
| Billing | billing:read or billing:admin |
Key actions
| Action | Permission | Roles |
|---|---|---|
| Create a data product | data_products:create | Admin, Engineer |
| Discover or list entities | entity:discover | Admin, Engineer, Viewer |
| Read entity definitions and store state | entity:read | Admin, Engineer, Viewer |
| Create or update entities | entity:write | Admin, Engineer |
| Administer entities | entity:admin | Admin, Engineer |
| Execute a workflow | workflows:execute | Admin, Engineer, Viewer |
| Deploy a project | deployments:execute | Admin, Engineer, Viewer |
| Approve a deployment | deployments:approve | Admin, Engineer |
| Run an analytics query | analytics:query | Admin, Engineer, Viewer |
| Create a connector | connectors:write | Admin, Engineer |
| Create an instance | instances:create | Admin |
| Update instance (non-upgrade) | instances:update | Admin, Engineer |
Change instance upgrade_mode | instances:admin | Admin |
| Run or schedule an instance upgrade | instances:admin | Admin |
| Invite a user | invitations:create | Admin |
| Assign a role | roles:assign | Admin |
| Manage billing | billing:admin | Admin |
| Use AI Chat | ai:chat | Admin, Engineer, Viewer |
| Use MCP tools | ai:mcp_tools | Admin, Engineer |
Known issue: Today
PUT /organizations/instances/{instance_id}also requiresorganizations:write(AND withinstances:update). Engineer-role users currently get 403 on any instance PUT. Admin is unaffected because that role also holdsorganizations:write(ADMIN_PERMISSIONSin20260621120000_rbac_consolidation.js).instances:adminplusinstances:updatealone would still 403. Tracked as #4747. The extraorganizations:writecheck is not the intended policy.
Managing Roles
Viewing roles
Navigate to Organization → Team → Roles to see all roles, both system and custom.
Creating a custom role
- Go to Organization → Team → Roles
- Click Duplicate on any existing role
- Rename it to a name that is not reserved, and adjust permissions. Saving a reserved name fails. See Reserved role names.
- Save
Assigning roles
- Go to Organization → Team → Users
- Click a user → Assign Role
- Select the role → Confirm
A user can hold multiple roles. Effective permissions = union of all assigned roles.
Rules for custom roles
Roles, their permissions, and role assignments are managed in the app under Organization → Team. Creating a role needs roles:create, and changing one needs roles:update. You can change only your organization's custom roles; system roles are read-only here.
Set a role's permissions
- How permission names resolve. A name that exists on a non-deleted permission in your organization and on a non-deleted system permission returns
409and saves nothing. Your organization's permission is used only when that name is not a system permission. The system catalog is used when your organization has no non-deleted permission with that name. When the organization Loxtep searches has more than one non-deleted permission with the name, the save returns409and saves nothing. A permission that belongs to another organization is rejected. - Saving sets the complete list. The permissions you save become the role's permissions and replace every permission it had. Saving a role with no permissions removes them all. Changing only the name or description keeps the current permissions.
- Saves are all-or-nothing. The role and its permissions are saved in one transaction. If any permission is rejected, the save fails and nothing changes.
- A system role cannot be edited from your organization. The save returns
403witherror.details{ role_id }, even for platform admins. Duplicate the system role into a custom role and change that. Platform admins edit system roles in the platform admin console. - Reserved names are rejected. Creating or renaming a role, in your organization or in the platform admin console, compares the name after trimming spaces and lower-casing it. The reserved names are
super_admin,support_agent,admin,engineer,viewer,owner, andorg_admin. " Owner " and "ORG_ADMIN" matchownerandorg_admin. The response is409witherror.messageRole name is reservedanderror.details{ "code": "reserved_role_name" }. Nothing is saved. An edit runs this check only when it changes the name. See Reserved role names. - Removing a data-product permission removes the entity grants Loxtep added for it. Entity grants you listed yourself stay. See Entity grants are added for you.
Reserved role names
super_admin, support_agent, admin, engineer, and viewer are the system role names. owner and org_admin are also reserved. You cannot create a role with any of them or rename a role to one, in your organization or in the platform admin console. Comparison is trim, then lower case, so "Admin", " admin ", and "ADMIN" are the same reserved name as admin. An edit that leaves the name unchanged keeps it, so a system role can keep admin while its description or permissions change. Saving that reserved name again as a new name returns the 409 and saves nothing.
Saving a reserved name returns this body. It is what the role create and update tests assert. It is unverified against a live environment.
{
"success": false,
"error": {
"message": "Role name is reserved",
"details": { "code": "reserved_role_name" }
}
}
Renamed reserved custom roles
If a custom role already used a reserved name, migration 20261026184050_rename_reserved_tenant_role_names renames that role to {normalized}__tenant_{role_id}. normalized is the old name with surrounding spaces removed and letters lower-cased. A role named owner becomes owner__tenant_{role_id}. A role named " ORG_ADMIN " becomes org_admin__tenant_{role_id}. You see that name on the role and on each person assigned to it. The role id stays the same.
The migration writes name, metadata.reserved_role_rename (from, to, and the migration id), and updated_at on that role row. It does not update assignment rows or permission grants. People assigned to the role keep that assignment, and the role keeps its permissions. Organization admin for domain membership still requires the organizations:admin permission, an active assignment to the system admin role, or platform super admin. The custom role's name does not supply it. See Domain-Level Governance.
The shared system roles stay named super_admin, support_agent, admin, engineer, and viewer when the row's organization is the system organization 00000000-0000-0000-0000-000000000000, is_system_role is true, and the normalized name is one of those five. A role named owner or org_admin in that organization is renamed. A role in your organization named admin is renamed even when is_system_role is true. A deleted role with a reserved name is renamed too.
Entity grants are added for you
When a role includes data product permissions, Loxtep adds the matching entity permissions on every create and update:
| If the role has | Loxtep also grants |
|---|---|
data_products:read | entity:discover and entity:read |
data_products:create, data_products:update, or data_products:manage | entity:write |
data_products:admin | entity:admin |
You do not need to list these yourself. A role that keeps data_products:read cannot drop entity:read, because the next save adds it back.
Loxtep records which entity grants it added and which ones you listed yourself. That decides what happens when you remove a data-product permission:
- Grants Loxtep added are removed with their data-product permission. Removing
data_products:readfrom a role also removes theentity:discoverandentity:readthat Loxtep added for it. - A grant that another permission still implies stays. A role with
data_products:createanddata_products:updatekeepsentity:writewhen you removedata_products:create, becausedata_products:updatestill implies it. Loxtep still counts it as a grant it added. - Entity grants you listed yourself stay. An
entity:*permission you select yourself when you create or edit the role stays when you remove the data-product permission, even when that permission also implied it. Remove it yourself when the role no longer needs it. - The role editors keep the grants Loxtep added separate. The role editor under Organization → Team and the admin role editor leave the entity grants Loxtep added out of the save, so the data-product permission adds them back as grants Loxtep added. Unchecking
data_products:readthere removes theentity:discoverandentity:readLoxtep added. - Entity grants stored before this tracking existed count as listed by you. Migration
20261102085519_role_permissions_derived_grantdid not reclassify existing rows. Those grants count as listed by you. Removing the data-product permission keeps them. Remove them yourself. Loxtep then adds back only the ones a remaining permission implies, as grants it added.
You cannot remove an entity permission while a permission still on the role implies it. Removing it returns 409 with error.message Cannot remove "<permission>" while the role still holds <permissions> and error.details { permission, implied_by }, and changes nothing. This is true whether you listed the entity permission yourself or Loxtep added it. Remove the permissions in implied_by first.
Loxtep looks up each added name the same way. A name that exists in your organization and on a system permission returns 409 and saves nothing. Your organization's permission is used only when that name is not a system permission, and the system catalog is used when your organization has none. An ambiguous added name returns the 409 below and saves nothing.
Fix permission errors
These errors are returned when you save a role, and use the standard envelope. For example:
{
"success": false,
"error": {
"message": "Unknown permission: governance:reed",
"details": { "permission": "governance:reed" }
}
}
| Status | error.message | error.details | What to do |
|---|---|---|---|
400 | Unknown permission: <ref> | { permission } | Check the name or UUID for typos. Deleted permissions also return this. Use a name from Permission Categories. |
400 | Permission "<ref>" is outside organization scope (organization_id=<role's organization>; only this org and system permissions are allowed) | { permission, organization_id } | The permission belongs to another organization. organization_id is the role's organization. Use your own or a system permission. |
409 | Ambiguous permission "<name>" in organization <uuid> | { permission } | Nothing was saved. <name> is error.details.permission, and <uuid> is the organization with more than one non-deleted permission of that name. This includes an entity permission Loxtep added (entity:discover, entity:read, entity:write, or entity:admin). Contact Loxtep support. |
409 | Permission "<name>" matches a system permission and cannot shadow it (organization_id=<uuid>) | { permission, organization_id, conflict } | Nothing was saved. <name> is also a non-deleted system permission. conflict is system_permission. Contact Loxtep support to resolve the organization permission that reuses the system name. |
409 | Role name is reserved | { "code": "reserved_role_name" } | The name matches a reserved role name after trim and lower case (super_admin, support_agent, admin, engineer, viewer, owner, org_admin). Choose another name. Nothing was saved. Creating a role always checks. Editing a role checks when the edit changes the name. Leave the name unchanged to keep a system role's current reserved name. |
500 | Cannot derive entity grant: permission catalog is missing "<entity permission>" | { permission } | The entity permission Loxtep needs to add is not in this environment's catalog. Retrying will not help. Contact Loxtep support. |
403 | Cannot modify system roles via the organizations API; system roles are shared by every organization | { role_id } | The role is a system role, shared by every organization. Duplicate it into a custom role and change that. |
500 | The role was not saved because the role-created event was not sent. | { code, role_id } | Creating the role did not save it because role-created was not sent. error.details.code is role_created_event_not_emitted. Save again. This sentence was not captured from a live environment. |
500 | The role update was not saved because the role-updated event was not sent. | { code, role_id } | Editing the role did not save the update because role-updated was not sent. error.details.code is role_updated_event_not_emitted. Save again. This sentence was not captured from a live environment. |
500 | Failed to create role or Failed to update role | {} | An unexpected server error. Nothing was saved. Retry, and contact support if it continues. |
Create an organization permission
An organization permission belongs to your organization only. Creating one needs permissions:create. Names are matched exactly. Creating it returns 409 and saves nothing when the name is already used, or when this resource and action are already used:
error.details.conflict | error.message | When | What to do |
|---|---|---|---|
system_permission | Permission "<name>" matches a system permission and cannot shadow it (organization_id=<uuid>) | <name> is a non-deleted system permission. | Use the system permission. Roles can refer to it by name. Choose another name for your own. |
organization_permission | Permission "<name>" already exists in organization <uuid> | Your organization already has a non-deleted permission with that name. | Use the existing permission, or choose another name. |
resource_action | Permission for resource "<resource>" and action "<action>" already exists in organization <uuid> | A non-deleted permission in your organization already uses this resource and action. The name can differ. | Use the existing permission, or choose another resource or action. |
A name conflict uses error.details { permission, organization_id, conflict }. organization_id is your organization. The system-name check runs first. A resource and action conflict uses error.details { resource, action, organization_id, conflict } with conflict resource_action. Neither body has a code field. These bodies are what the permission create tests assert for system_permission and resource_action. They are unverified against a live environment.
{
"success": false,
"error": {
"message": "Permission \"data_products:read\" matches a system permission and cannot shadow it (organization_id=<uuid>)",
"details": {
"permission": "data_products:read",
"organization_id": "<uuid>",
"conflict": "system_permission"
}
}
}
A resource and action conflict returns this body:
{
"success": false,
"error": {
"message": "Permission for resource \"reports\" and action \"read\" already exists in organization <uuid>",
"details": {
"resource": "reports",
"action": "read",
"organization_id": "<uuid>",
"conflict": "resource_action"
}
}
}
Platform admin console
Platform admins with system:admin manage system and custom roles under Admin → Roles in the app. The admin role editor uses the same name and UUID rules for the role's organization: a permission name that also exists on a non-deleted system permission returns 409, and the system catalog is used only when that organization has no non-deleted permission with the name. A system role's organization is the system organization, so only the system catalog is searched. It also uses full-list replacement on save, entity grants (including removing the ones Loxtep added when their data-product permission leaves the list), and the errors above, including the ambiguous-permission 409, the system-name 409, and the reserved-name 409. Creating a role always rejects a reserved name. Editing a role rejects one when the edit changes the name. Leave the name unchanged to edit a system role's description or permissions without renaming it. The system-role 403 does not apply here. Differences:
- New Custom Role creates the role in the organization you choose.
- New System Role creates the role in the system organization, so it can only use system permissions.
- An edit changes only the name, description, and permissions, and does not check the role's organization.
- The admin console is the only place to edit a system role. Editing a system role from your organization is refused with
403, even for platform admins.
Permission Categories
| Category | Actions |
|---|---|
| Access Requests | create, manage, read |
| Agent Orchestration | read, write |
| AI | chat, graph_query_translate, mcp_tools, read, schema_inference, template_recommend, use |
| Alerts | create, delete, read, update |
| Analytics | admin, execute, query, read |
| Audit | export, read |
| Billing | admin, read, update, costs:read, invoices:*, payment_methods:*, plans:*, subscriptions:*, usage:* |
| Bots | create, delete, execute, read, update |
| Catalog | create, read, write |
| Connections | create, delete, read, update |
| Connectors | read, write |
| Contracts | create, delete, read, update |
| Data Products | admin, create, delete, export, manage, read, update |
| Deployments | approve, create, delete, execute, read, reject, rollback, update |
| Domains | create, delete, read, update |
| Entities | admin, discover, read, write |
| Governance | admin, create, delete, read, update |
| Images | admin, delete, read, update, upload, *:self |
| Instances | admin, create, delete, read, update |
| Integrations | create, delete, read, update |
| Notifications | read, update |
| Observe | read, dashboard:read, logs:read, queues:read, stats:read, trace:read |
| Ontology | create, delete, read, update |
| Organizations | admin, read, update, write |
| Permissions | admin, assign, create, delete, grant, read, revoke, update |
| Policies | create, delete, read, update |
| Procedures | create, delete, read, update |
| Projects | create, delete, read, update |
| Quality | read, write |
| Roles | admin, assign, create, delete, read, remove, update |
| Schemas | create, delete, read, update |
| Templates | create, delete, read, update |
| Users | admin, create, delete, invite, read, update |
| Webhooks | create, delete, read, update |
| Workflows | configure, create, delete, execute, file_upload, read, update |
Troubleshooting
"Insufficient permissions" error
The error message shows which permission is required. Ask your Admin to assign the appropriate role or create a custom role with that permission.
Missing sidebar items
Navigation items are hidden when you lack their required resource permission. Contact your Admin to get a role upgrade.
A tool or command returns 403
Check the error for required_permissions. Verify your roles with loxtep_session → get_current_user.
Permission cache
After role changes, permissions take effect within about 5 minutes. Auth reloads permissions from the database on every request, behind a 5-minute RBAC cache. No token refresh is needed.