Roles
A role in Choreo Identity & Access Management is a named set of permissions that you assign to users, groups, applications, or agents. Roles connect the permissions defined in your resource servers to the principals that need access to them.
Each role:
- Belongs to an Organization Unit (OU), which defines the organizational scope of the role.
- Contains a set of permissions drawn from one or more resource servers.
- Has zero or more assignments: the users, groups, applications, or agents that hold the role.
Prerequisites
Before creating a role, you need:
- An organization unit to scope the role. See Organization Units.
- At least one resource server with defined permissions. See Resource Servers.
Permission Requirements
Choreo Identity & Access Management prevents you from granting permissions you do not hold yourself. This applies whether the recipient is another principal or your own account.
You can perform the following operations only if you already hold every permission involved:
| Operation | Requirement |
|---|---|
| Create a role with permissions | You hold every permission in the new role. |
| Update a role's permissions | You hold every permission in the updated set. |
| Add or remove a role assignment | You hold every permission the role grants. |
Permissions are compared per resource server. A permission you hold on one resource server does not satisfy a requirement on a different resource server, even when the two permission strings are identical.
The comparison respects the permission hierarchy. If you hold system:user, you can grant system:user:view, because the parent permission covers its children. The reverse does not apply: holding system:user:view does not let you grant system:user.
Holders of the root system permission are exempt, since that permission already authorizes every system operation.
If an operation would grant more than you hold, it is refused and no change is made.
Because you must hold a permission to grant it, an administrator whose job is to manage role assignments needs to hold the permissions they distribute. Grant such an administrator the union of the permissions they are expected to assign.
Create a Role
- Navigate to Roles in the Choreo Identity & Access Management Console and click Add role.
- Enter a Name for the role. The name must be unique among the roles the selected organization unit owns and the roles shared with it.
- Optionally enter a Description.
- Select the Organization unit the role belongs to.
- Select the Permissions to include by choosing a resource server and its actions.
- Optionally add Assignments to immediately assign the role to users, groups, applications, or agents.
- Click Create.
Saving a change does not make it live. You author in the control plane, and your users sign in on a separate data plane, so a change takes effect in an environment only after you deploy it. Go to Deploy, deploy the latest version to your first environment, then promote it to the next environment when you are ready.
Auto-sync deploys saved changes to your first environment within seconds. Turning it on is your choice, per project. See Deploy a Version, or learn why you deploy and how auto-sync works.
List Roles
Navigate to Roles in the Choreo Identity & Access Management Console to view all roles. The list shows each role's name, description, and organization unit.
Roles created from declarative configuration are marked as read-only and cannot be modified or deleted.
Update a Role
- Open the role from the Roles list.
- Update the Name, Description, or Permissions.
- Click Save.
The update replaces the full set of permissions. Include every permission the role should keep: any permission omitted from the request is removed.
Delete a Role
- Open the role from the Roles list.
- Click Delete and confirm.
Deletion fails if the role has active assignments. Remove all assignments before deleting the role.
Manage Role Assignments
A role assignment grants the role's permissions to a principal. Principals can be users, groups, applications, or agents. When you assign a role to a group, all members of that group inherit the role's permissions.
| Assignee Type | Description |
|---|---|
user | A user account. |
group | A group. All current and future members inherit the role's permissions. |
app | An application principal. |
agent | An agent principal. |
View Assignments
Open the role from the Roles list and select the Assignments tab to see all current assignments organized by type.
Add Assignments
- Open the role from the Roles list.
- Select the Assignments tab.
- Click Add Assignments.
- Search for and select the users, groups, applications, or agents you want to assign.
- Click Add.
Remove Assignments
- Open the role from the Roles list.
- Select the Assignments tab.
- Click Remove next to the assignment you want to delete and confirm.
Scope Roles to a Project
For how projects work in the Console, see Projects.
A role belongs to the project selected in the project switcher in the header when you create it. A role created with no project selected belongs to no project and stays organization-level.
When a project is selected in the Console, Roles lists only that project's roles, and Add role creates the role in the project without asking for an organization unit, because a role in a project is in the system organization unit. With no project selected, Roles lists every role. See Work in a Project.
Role names are unique per organization unit. Every project's roles are in the system organization unit, so a role cannot take the name of another project's role or of an organization-level role in the system organization unit.
A project groups roles for management only. Assignments, sharing, and the role names that tokens carry work the same whatever project a role belongs to.
Mandated Assignments
A user share can mandate a role for a user in a child organization unit. A mandated assignment differs from a direct one in these ways:
- It shows as read-only in the role's assignments.
- The organization unit cannot remove it. A removal that names only a mandated assignment fails with
ROL-1036. - A direct assignment of the same role to the same user in the same organization unit can exist beside it, and removing that direct assignment leaves the mandated one in place.
- It is not limited by the role's sharing rules. If the role is shared with the organization unit with assignments turned off, a mandate still applies there.
Two changes are refused with 409 Conflict while a user share mandates the role:
| Change | Error |
|---|---|
| Unsharing the role from an organization unit where a user share mandates it | ROL-1037 |
| Deleting the role | ROL-1039 |
Remove the role from those user shares first, then repeat the change.
Related Guides
- Resource Servers - Define the permissions that roles reference
- Groups - Assign roles to groups to grant permissions to all their members
- Users - Assign roles directly to individual users
- Organization Units - Each role is scoped to an organization unit
Was this page helpful?