Skip to main content
The foundation is governed by design, and RBAC is how that governance reaches into each workspace. Role-Based Access Control (RBAC) is the security model used in Prisme.ai to manage who can access, modify, and use different parts of your workspace. It ensures that users only have the permissions they need while protecting sensitive information and functionality.

RBAC Fundamentals

The RBAC system consists of several key elements:
  • Roles: Sets of permissions that can be assigned to users
  • Subjects: Resources that can be acted upon (pages, files, events, etc.)
  • Actions: Operations that can be performed on subjects (read, create, update, etc.)
  • Rules: Define which roles can perform which actions on which subjects
  • Conditions: Optional criteria that further restrict when rules apply
These components work together to create a flexible yet secure access control system.

Managing Roles and Rules

1

Accessing RBAC Settings

To view and edit your workspace’s access control configuration:
  1. Go to your workspace
  2. Navigate to Settings > Advanced > Manage Roles
  3. Edit the YAML configuration
  4. Save your changes
Changes to RBAC settings take effect immediately. Be careful not to lock yourself out!
2

Defining Roles

Create custom roles to fit your organization’s needs:
The auth section allows you to automatically assign roles based on authentication providers.
3

Creating Rules

Define what each role can do with specific rules:
Each rule must include at least:
  • action: What can be done (a single action or list)
  • subject: What it can be done to (a single subject or list)
Rules can optionally specify:
  • role: Which role this applies to (if omitted, applies to everyone)
  • conditions: Restrict the rule to specific cases. If omitted (or an empty object), the rule will apply to every instance of specified subject
  • inverted: Set to true to make this a deny rule instead of allow
  • reason: Documentation string for the rule
4

Adding Conditions

Restrict rules to specific situations with conditions:
Conditions use a subset of MongoDB query syntax for powerful filtering.

Common RBAC Patterns

Control what unauthenticated users can access:
To let anyone emit some events (for automations), add a rule for these events, or set Events to Public in Settings › Security › Access control for all of them (see Open the events a page emits).
Rules without a role specified apply to everyone, including unauthenticated users.
Define what each role can do:
This approach creates a clear hierarchy of access permissions.
Configure permissions for API access:
This allows creating an internal workspace API key with specific permissions.
The api key value can’t be directly accessed, but instead can be injected in fetch instruction :
Automatically assign roles based on SSO provider & auth data :
This reduces manual user management by leveraging authentication information.

Subjects and Actions

RBAC controls access to various resource types through subject and action combinations:
Subject : workspacesActions :
  • read : allows reading the workspace configuration
  • update : allows updating the workspace configuration
  • delete : allows deleting the workspace
  • manage_security : allows updating security configuration
  • manage_permissions : allows sharing / unsharing
  • aggregate_search : allows using /search API
  • get_usage : allows using /usage API
  • manage_repositories : allows managing repositories settings
  • manage : allows all above actions
Subject : pagesActions :
  • create : allows creating a page
  • read : allows reading pages
  • update : allows updating pages
  • delete : allows deleting pages
  • manage : allows all above actions
Subject : filesActions :
  • create : allows uploading a file
  • read : allows reading files
  • update : allows updating files
  • delete : allows deleting files
  • manage : allows all above actions
Subject : assetsActions :
  • create : allows uploading a new asset
  • read : allows reading and listing assets
  • update : allows replacing an asset, or changing its access, labels, or metadata
  • delete : allows deleting assets
  • manage : allows all above actions
Without any rule, owners and editors can manage the workspace assets, viewers can read them, and the access level of each asset grants read to more users: any signed-in user for authenticated, anyone for public, and the organizations and groups of its bindings for private. Rules can match the path, folder, name, mimetype, sharing, bindings, labels, and metadata of an asset. See Workspace assets.
Subject : eventsActions :
  • create : allows emitting an event
  • read : allows reading events
  • manage : allows all above actions
Subject : automationsActions :
  • create : allows creating an automation
  • read : allows reading automations
  • update : allows updating automations
  • delete : allows deleting automations
  • execute : allows executing automations
  • manage : allows all above actions
Subject : secretsActions :
  • create : allows creating secrets
  • read : allows reading secrets
  • update : allows updating secrets
  • delete : allows deleting secrets
  • manage : allows all above actions
Subject : secure_secretsActions :
  • create / update : allows depositing a credential
  • read : allows replaying one, which only an automation taking on a role can do
The native editor role holds no right on this subject: a workspace grants it through a role of its own.Secure secrets hold credentials, so this subject is narrower than the others: values are resolved by the runtime through the $secret: references of the secrets module and never handed back to a caller, whatever the rule says. What a rule must prove depends on who it applies to. See Secure secrets below.
Subject : appsActions :
  • create : allows publishing an app
  • read : allows viewing/installing apps
  • update : allows updating apps
  • delete : allows deleting apps
  • manage : allows all above actions

Restrict a rule to some users

Introduced in v27.11.0.
A rule applies to every user by default, or to the users of its role. Add a user condition to apply it only to the users it matches, or to give a role to the users it matches. It is written like conditions, with the subset of MongoDB queries, and matched on the caller of each request.

Give a role, or restrict a single rule

The same user condition can be written on a role or on a rule: A role without auth nor user is only given explicitly, when the workspace is shared with a user. For example, this role gives the members of the partner organization read access to the pages and assets labelled partners:

Fields of the user

authProvider describes the current session only. To target every user who signed in with an SSO provider once, use auth on a role, or match authData.<provider>.

Examples

This rule lets the members of the sales group of the acme organization read the pages labelled sales, and nobody else through this rule:
This rule lets any signed-in user read the pages labelled members, but never an anonymous session (such as a public chat embed):
This role is given to the members of acme whose organization role grants the permission reports:read of the workspace my-workspace, and lets them read the pages labelled reports:
The same user condition works on a single rule. Unlike the permission of the access, a user condition doesn’t expand the wildcards nor tie the permission to an organization: list them, and add org.slug, otherwise the role of any organization can grant it. A user condition only narrows the users a rule applies to: it never grants anything by itself. On an inverted rule (inverted: true), it narrows the users the denial applies to. A condition that is not a valid query is refused when the security is saved. The caller is fully known on the HTTP calls (endpoints, API) and the websockets, not on the runs an event or a schedule starts. So a user condition on an automations rule, or the automations rules of a role given from user, only apply to the endpoint calls: the events are controlled when they are emitted (see Control who calls the endpoints and emits events). A user can only target their own organizations and their groups in a user condition, with listed values (a value, $in or $eq on orgSlugs, groupIds or org.slug): another organization, another field of the active organization (org.groups…), or an operator that may reach any organization ($nin, $ne, $regex…), is refused, unless the platform allows cross-organization sharing (ALLOW_CROSS_ORG_SHARING). Platform superadmins target any organization. The conditions a security already has, or that a duplicated or imported workspace brings, are kept.

Secure secrets

Secure secrets store credentials: an OAuth refresh token a member deposits when connecting their account, an API key a connector needs. Two rules describe their lifecycle, and they are deliberately asymmetric.

Letting members deposit their own credential

The name condition is what isolates members from each other, so it is mandatory and checked when the workspace is saved. It must pin ${user.id}, anchored, with every other character a literal. Without it, one rule would let any member overwrite every other member’s credential. A single fixed-width character class such as [a-f0-9]{16} is allowed, so a connector can hold one credential per remote account rather than one per person. Its width must be fixed: with a variable one, two different pairs could spell the same name. manage is never grantable here, and delete only to a role (below). read is accepted, but a rule carrying no role applies to every member, so granting it here would let each of them read all the others’ credentials — the platform lets you write it and does not recommend it.

Letting an automation replay them

A scheduled synchronisation, or any automation acting for the workspace rather than for its caller, has no user behind it. It cannot read a credential under anyone’s permissions, which is exactly the problem: the tokens the workspace’s own members deposited are unreadable to its own sync. Nothing about the shape of a run answers that. An unauthenticated cron and an unauthenticated HTTP call are indistinguishable, so the workspace states it instead: it declares a role, and the automation takes that role on for the one call that needs it.
delete belongs there for the same reason as the write: a connector that sees a token rejected for good drops it, so the run stops retrying and the member is asked to reconnect. It is grantable only to a role — on a rule that applies to every member it would hand each of them the right to destroy the others’ credentials.
assumeRole applies to that single call. Everything around it keeps the caller’s own rights, and nothing is carried to the automations it calls, to an emit, or across a workspace boundary.

What each rule has to prove

The two rules above look alike and answer different questions. A rule carried by no role lands on default, which applies to every member. Writing a name they choose would let one member overwrite another’s credential, so ${user.id} is mandatory there: it is the only thing keeping members apart. A rule carried by a role applies to whoever takes it on, which is an automation acting for the workspace. It may name a family of secrets instead, for reads and writes alike. Reads, because a synchronisation serves everyone and there is no user to bind to. Writes, because providers that rotate their refresh tokens hand back a new one that has to be stored for a member who is not there. A family pattern must carry a literal prefix of at least six characters ending on a separator, and can never reach the reserved prismeai_ namespace.
Anything holding that role can read and overwrite every credential in the family. That is the price of servicing absent users, and it is why the role should be declared for that purpose alone: do not grant it to a person, and do not give it an auth block. An API key bound to it would hand every member’s credential to whoever holds the key. The platform does not prevent either: it is yours to decide.
Two things remain out of reach whatever the role. Secrets of scope: user belong to a person, and a run without one is refused before permissions are even consulted. And owner cannot be assumed at all, so a developer has to declare a role that states what it opens rather than reaching for everything.

Roles of installed apps

A workspace grants an installed app access to secrets through a role named app:<source workspace id>:<role>, whose rules name app:<source workspace id>: secrets. Nothing is read from the app’s own security rules: a rule applies only once this workspace holds it, and changes only when this workspace changes it. These roles are normally written by granting what the app asks for, but they are ordinary rules of security.yml:
  • A rule carried by an app: role names an app:<source workspace id>: prefix: that app’s own, or another app’s, so that it shares that app’s secrets. Any other name would match nothing, so it is refused.
  • A rule carried by no role cannot name app: secrets: on default, it would apply to every member.
  • Only the app named by the role can take it on. An automation of the workspace itself cannot assume an app: role, and the workspace cannot be shared with a member under one.
  • A rule held before these checks existed, and now refused, is kept as long as it is unchanged: saving the security returns a warning for it. Changing it, or adding it to another workspace by an import, is refused. Duplicating the workspace fails while it holds such a rule, and the error names the rule to fix: a copy holds no role yet to compare it with.
  • An app: role cannot carry auth: it would be given to every member it matches, or become an API key the app can no longer take on.
Sharing an app’s secrets with another app. Two apps working on the same account can share its tokens. Give the role of one a rule naming the prefix of the other, and the first app names that secret in full, app:<other source workspace id>:<name>:
Without that rule, the first app gets not_found on the other’s secrets. An app cannot ask for it in requiredAuthorizations, whose names are relative to its own secrets: the workspace writes it. What an app may ask for is declared by its publisher in requiredAuthorizations: see Asking for authorizations. Granting and withdrawing. Granting, and editing these roles in security.yml, require the manage_security permission: owners hold it, and a custom role can be given it. To withdraw what an app was granted, remove its app: role and the rules carrying it from security.yml, or uninstall the app: any uninstall withdraws them, unless another installed app still uses them, and keeps the app’s secrets unless their purge is asked. See Secrets stored by apps. The app then gets Unknown role again, and a reinstalled app waits for an owner to grant it again.

Control who calls the endpoints and emits events

Introduced in v27.11.0.
Calling the endpoints of a workspace and emitting events to it triggers its automations. Since v27.11.0, a new workspace keeps both to its owners and editors (access.endpoints: private and access.events: private). A workspace created before keeps its access: without access.endpoints, anyone, even without signing in, can call its endpoints. The access of the workspace app doesn’t change that: the app calls them, it doesn’t protect them. Settings › Security › Access control sets both: Each one takes one of these levels: The access never locks out the owners and editors: they call the endpoints and emit events whatever its level, unless a rule of the security restricts them. Everybody else, the viewers and the users of the custom roles included, gets what the level lets in, plus what the rules of the security add. The settings are stored in the access section of the security, and the rules add exceptions to it:
bindings takes organizations (principalType: org, an organization slug, or * for the members of any organization) and groups (principalType: group, as organization:group). The access belongs to the environment, like the bindings of the assets: an import into an existing workspace (archive, Git pull) never replaces its access, which you change from Access control or the API. A workspace created by an import gets the access of the imported security. Through the API, GET /v2/workspaces/{workspaceId}/security/access returns the access and the levels in force, and PUT /v2/workspaces/{workspaceId}/security/access sets the access alone (an empty object removes it), keeping the rest of the security as it is.

Require a permission of the organization roles

Introduced in v27.11.0.
A private access can also require an organization permission (orgPermission), which the roles of the organizations grant: only the members of the organizations and groups of bindings whose role grants it get in. It narrows the bindings, it never opens to anyone else:
The workspace names the permission <subject>:<action>, and an organization role grants it as ws:<workspace slug>:<subject>:<action>: Access control shows this full name, to copy into a role of AI Governance. ws:<workspace slug>:<subject>:*, ws:<workspace slug>:*, ws:* and * grant it too.
  • The permission comes from the role of the active organization of the user, and only counts when it is one of the organizations of bindings (or the organization of a group of bindings): a user granted it by another organization they switched to doesn’t get in. The roles of the other organizations can’t give it.
  • It requires a private access with bindings, and only applies to the private levels: an authenticated endpoint access ignores it.
  • Its subject can’t be one of the workspace subjects (automations, assets, events, pages…), kept for the permissions of the workspaces themselves.
  • With every organization (*) in bindings, the role of the active organization of the user, whichever it is, can grant it: any organization administrator can give it to their members. Bind given organizations to keep it to the roles of these organizations.
  • The full name follows the slug of the workspace: once the slug changes, the roles must grant the new name (ws:<new slug>:…), and remove the former one, which a workspace taking the former slug would require under the same name. A duplicated or imported workspace requires it under its own slug.
  • In a user condition of a rule or a role, permissions is matched as is, wildcards included: list the ones that grant it, and combine it with org.slug (an organization of yours) so that the role of another organization can’t give it. See the example.
What applies, from the strongest to the weakest:
  1. The rules of the security: exceptions, which open (or close) for some roles, users or automations.
  2. The owners and editors, and the endpoints with authorizations.action: public (since v27.11.0, public is a native action open to anyone): allowed whatever access and the defaults say.
  3. access: who can call the endpoints without action and emit events.
  4. Without access (workspaces created before it): the endpoints stay public; the events are only open to whom the rules let in, so a workspace without such a rule only lets the owners and editors emit events. Access control always sets a level for the events.
A rule without role nor user that opens a surface to anyone reopens it whatever its access: Access control then says so. It doesn’t detect every widening: a role given automatically to every signed-in user (an auth provider without conditions) with a rule opening the events, for example, widens their access without a notice. The rule Anyone can create any events that older workspaces have opens the events to anyone: setting the events in Access control replaces it.

Open the events a page emits

A new workspace keeps its endpoints and events to its owners and editors (access.endpoints: private, access.events: private): open the endpoints its pages call to their users in Access control (Signed-in users, or Private with organizations and groups). Most events are internal to the workspace, emitted by its automations, and a user emitting them directly could trigger automations that skip the checks of its endpoints. Pages mostly call endpoints, protected by the endpoints access and the actions of the roles. A page that emits events needs a rule for them, for the roles that use it, or for everyone:
Open only the event types the page emits: an automation these events trigger runs for whoever emitted them. Keep the sensitive operations in endpoints, protected by an action.
An endpoint called by a third-party service (a webhook from another tool, without a Prisme.ai session) stops answering once the endpoints are not public. Give it authorizations.action: public to keep it open to anyone:
When the workspace has endpoints and they are open to anyone, the Publish dialog of the page editor warns about it, with a link to these settings. access is part of the security: it is exported, versioned and imported with the workspace, its organizations and groups included. Check them after importing a workspace from an environment with other organizations.

Securing Automations

Beyond who can call them (see Control who calls the endpoints and emits events), the automations of a workspace can each require a role. To restrict access to sensitive automations:
1

Define Authorization Action

In your automation, specify an authorization requirement:
The authorizations.action field specifies a permission key for this automation.
2

Create Permission Rule

Define who can execute automations with this authorization key:
This restricts execution only to users with the specified role.
3

Test the Restriction

Verify that:
  • Users with the admin role can execute the automation
  • Users without the admin role receive an authorization error
  • The automation cannot be called indirectly by other automations without permission

Open several automations to the holders of an organization permission

Introduced in v27.11.0.
To keep the mapping in one place, give the automations a logical action of the workspace, and map this action to an organization permission and to organizations or groups in the security. Every automation with authorizations.action: reports:
opens to the members of acme (or of its analysts group) whose organization role grants ws:my-workspace:reports:read:
Grant ws:my-workspace:reports:read in a role of AI Governance (custom permission). The permission is read from the role of the active organization of the user: org.slug (or a group, always of the active organization) keeps it to the roles of acme. A role given from user only applies its automations rules to the endpoint calls. Owners and editors keep calling these endpoints.
Building a React app (SPA) on top of these rules? Role-Based Access for Your App walks through protecting its endpoints and sharing it with users from Settings › Sharing.

Using API Keys

API keys allow programmatic access to your workspace with specific permissions :
  1. Use Prismeai APIs to generate an api key :
  1. Include the received apikey in x-prismeai-api-key header :
Keep API keys secure. They grant access based on their associated role without requiring user authentication.
For internal API calls from automations, you can define built-in API keys:
This creates an internal API key that automations can use:
Workspace API keys are not visible in the UI and are specifically for internal use.

Example RBAC Configuration

Here’s a complete example of a typical RBAC configuration:

Security Best Practices

Principle of Least Privilege

Give users only the permissions they actually need:

  • Start with minimal permissions and add as required
  • Use specific conditions to limit rule scope
  • Avoid “manage” permission when more specific actions suffice
  • Regularly review and prune unnecessary permissions

Secure Public Access

Carefully control what unauthenticated users can do:

  • Use explicit conditions on public rules
  • Limit event creation to specific event types
  • Be cautious with file upload permissions
  • Restrict user session events appropriately

Protect Sensitive Automations

Secure automations that access sensitive data:

  • Add authorization requirements to important automations
  • Create specific roles for administrative functions
  • Avoid sensitive data exposure through events
  • Test automations with different user roles

Manage API Access

Control programmatic access carefully:

  • Create API keys with minimal required permissions
  • Rotate API keys regularly
  • Monitor API key usage for unusual patterns
  • Delete unused API keys promptly

Troubleshooting

When users encounter permission errors they shouldn’t:Check these common issues:
  • Verify the user has the correct role assignment
  • Look for inverted rules (deny rules) that might be applying
  • Check if conditions on rules are unintentionally restrictive
  • Ensure the rule order places more specific rules after general ones
Example fix:
The caller doesn’t match the access of the endpoints: an anonymous visitor (or a third-party service) on Signed-in users, a user outside the organizations and groups on Private. Add their organization or group in Settings › Security › Access control, add a rule for their role (see Control who calls the endpoints and emits events), or give the endpoint authorizations.action: public if it must stay open to anyone.
When users have permissions they shouldn’t have:Check these common issues:
  • Look for overly broad rules without conditions
  • Check if the user has multiple roles granting cumulative permissions
  • Verify automatic role assignment isn’t giving unintended access
  • Ensure public rules (no role specified) aren’t too permissive
Example fix:

Next Steps

Role-Based Access for Your App

Share a React app with users through workspace roles

Automations

Explore automations and their security model