Skip to content

Roles and RBAC

Shoehorn uses role-based access control (RBAC) powered by Cerbos to manage permissions. Roles determine what users can see and do in the platform.

Role Description
tenant:admin Full access to everything in the tenant
tenant:viewer Read-only access to all resources
Role Permissions
Entity
entity:viewer View and list entities, repositories and docs
entity:editor Create and update entities; sync repositories, refresh a repository, refresh a docs repository
entity:admin Delete entities
Workflow
workflow:viewer View and list workflows
workflow:executor Create, execute, cancel own runs, retry own runs
workflow:admin Delete workflows, cancel/retry any run
Mold (Template)
mold:viewer View and list molds
mold:editor Create and update own molds
mold:publisher Publish molds
mold:admin Delete molds
Operations
operations:viewer View workloads and services
operations:operator Update operations resources
operations:admin Delete operations resources
Admin
admin:viewer Read-only admin: view settings and analytics
admin:operator Manage users, integrations, dashboards
Marketplace
marketplace:viewer Browse marketplace
marketplace:editor Install and configure items

Higher roles include all permissions of lower roles:

entity:admin -> entity:editor -> entity:viewer
workflow:admin -> workflow:executor -> workflow:viewer
mold:admin -> mold:publisher -> mold:editor -> mold:viewer
tenant:admin -> all resource roles
  1. Navigate to Admin > Users
  2. Select a user
  3. Click Add Role
  4. Select the role
  5. Click Save
Terminal window
# Add a role to a user
curl -X POST https://shoehorn.example.com/api/v1/admin/users/<user-id>/roles \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"role": "entity:editor"}'
# Remove a role from a user
curl -X DELETE https://shoehorn.example.com/api/v1/admin/users/<user-id>/roles \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"role": "entity:editor"}'
Terminal window
curl https://shoehorn.example.com/api/v1/admin/roles \
-H "Authorization: Bearer <token>"

Returns all role assignments with user details.

Some operations are restricted by ownership:

  • Workflow cancel/retry: workflow:executor can only cancel or retry their own runs
  • Mold update: mold:editor can only update molds they created
  • workflow:admin and mold:admin can operate on any resource
  1. User authenticates (OIDC session or API key)
  2. Middleware extracts user roles from the database
  3. For each request, Cerbos evaluates:
    • User’s roles
    • Target resource type and ID
    • Requested action
    • Tenant isolation (user’s tenant must match resource’s tenant)
  4. Access is granted or denied

API keys use scope-based authorization instead of roles. See API Keys.

If a user has no roles assigned, all requests return 403 Forbidden. There are no implicit permissions.

Shoehorn keeps an audit log of role assignments and removals, group mapping changes, API keys being created or revoked, workflow deletions, license changes, identity provider switches, and MCP queries. The latest entries show under Recent activity on the Admin overview, and GET /api/v1/admin/activity?limit=<n> returns them for your tenant.

Entries are deleted after 90 days. On a self-hosted install, change that with AUDIT_LOG_RETENTION_DAYS in the worker’s environment (worker.env in the Helm chart). Shoehorn always keeps at least 7 days, whatever you set.

For a longer trail, or one that covers every database write, enable pgaudit on the platform’s Postgres and query it directly.