Custom Opal roles

Learn how to create custom Opal roles.

Custom Opal roles consist of granular sets of permissions which you can assign to users and groups. Use custom roles to manage users and teams with differing access requirements.

See Special roles in Opal for an overview of existing, reserved Opal roles—Admin, Auditor, etc.

Requirements

To create custom Opal roles, you must:

  • Be an Opal Admin
  • Be on version 1.1008 or later, if you self-host Opal

Create and edit custom roles

To create a custom role:

  1. Go to the Inventory and search for the Opal app.
  2. From the Assets tab, select + Custom Role.
  1. Start with a templated set of permissions based on the given role, or create your role from scratch. You can add and remove granular permissions in the following step.
  1. Set the role's name, description, and admin, and optionally update permissions for the role. Some permissions can be scoped to specified groups, resources, or users, and some apply to all assets.

After you save the role, add users and groups to the role from the User Access and Group Access tabs, as you would grant access to any other resource.

To edit a custom role's scopes, select the edit icon on the role scopes from the Scope tab.

Permissions

You can edit permissions on a custom role at any time. Permissions are non-additive, and do not depend on each other. You may need to explicitly add read permissions for edit permissions to take effect.

In this table, View permissions indicate the role can access the item in the Inventory and Catalog. See Role and visibility hierarchy for examples of how roles interact with existing settings.

Note that Admin Owner refers to the Admin set on a resource or group, not the Opal Admin role.

PermissionApplicable rolesApplies to sub-resourcesAvailable on custom roles
View apps, resources, groups, and sync status in the InventoryAdmin, Read-only Admin, Admin Owner*, AuditorYY
Sync apps, resources, and groupsAdmin, Admin Owner*YY
Import or create resources within appsAdmin, Admin Owner*YY
Create appsAdminNY
Edit app, resource, and group settingsAdmin, Admin Owner*YY
Edit app sync settingsAdminYY
Edit app, resource, and group tagsAdmin, Admin Owner*YY
Export app, resource, and group dataAdmin, Read-only Admin, Admin Owner*, AuditorYY
Edit app, resource, and group request configurationAdmin, Admin Owner*YY
Edit app, resource, and group assignmentsAdmin, Admin Owner*, Group Leader**YY
Delete apps and resourcesAdmin, Admin Owner*YY
View bundlesAdmin, Admin Owner*, Read-only AdminNY
Delete bundlesAdmin, Admin Owner*NY
Create bundlesAdminNY
Edit bundle assignmentsAdmin, Admin Owner*NY
Edit bundle settingsAdmin, Admin Owner*NY
Create access reviewsAdmin, AuditorNN
View access reviewsAdmin, Read-only Admin, AuditorNN
Stop access reviewsAdmin, AuditorNN
Edit access review settingsAdmin, AuditorNN
Assign reviewersAdmin, AuditorNN
Send access review remindersAdmin, AuditorNN
View access review templatesAdmin, Read-only Admin, AuditorNN
Create, edit, and delete access review templatesAdmin, AuditorNN
Edit user tagsAdminNY
Edit user settingsAdminNY
View all usersAdmin, Read-only Admin, AuditorNY
Export usersAdmin, Read-only Admin, AuditorNY
Create usersAdminNY
View configuration templatesAdminNN
Create and delete configuration templatesAdminNN
Edit configuration template settingsAdminNN
View Risk CenterAdmin, Read-only AdminNN
View eventsAdmin, Read-only Admin, Admin Owner*, AuditorNN
View global settingsAdmin, Read-only AdminNN
Edit global settingsAdminNN

*Admin Owners can only view and modify the groups or resources they own.

**Group leaders can only edit assignments for groups they lead.

Role and visibility hierarchy

Custom roles take precedence over visibility settings. If a user is assigned a role which gives view access to an asset (resource, group, etc.), but the asset's visibility settings do not include the user's groups, the user can still view the asset.

Note that edit permissions do not imply view permissions. If you grant a role the permission to edit a resource, but not permission to view it, permission to view the resource is not included in the role. In that case, the user may be prevented from viewing the resource, depending on visibility settings.

For example:

  • Custom Role A has permissions to edit, but not view, Resource B.
  • Resource B has group visibility settings set to allow Group C to view the group.
  • User D and User E are granted access to Custom Role A.
  • User D is a member of Group C.
  • In this case, User D will be able to view and edit Resource B, but User E will not.

Inherited permissions

Permissions applied to apps, resources, and groups automatically apply to any nested resources. If Resource A contains nested Resource B, scoped permissions granted to Resource A also grant the same permissions to Resource B.

Manage roles via API

To create a scoped role with the API, use POST /resources with app_id set to the Opal connection ID and resource_type set to OPAL_SCOPED_ROLE.

To set scoped permissions, use PUT /v1/resources/:resourceId/scoped-role-permissions.

To read scoped permissions assigned to a role, use GET /v1/resources/:resourceId/scoped-role-permissions.