Skip to content

Commit 3748390

Browse files
docs(sso): document SAML + SCIM "Map roles by group" (CUB-2653) (#10938)
Adds Map roles by group sections to the Okta and Microsoft Entra ID SAML pages and cross-links them from the matching SCIM pages, covering the new groupsRolesMap setting, the attributeGroups SAML attribute, the additive role-assignment semantics, and the IdP-side group claim setup required for Okta. Notes that Entra's canonical groups claim URL is read automatically. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 64a1eb2 commit 3748390

4 files changed

Lines changed: 185 additions & 5 deletions

File tree

docs-mintlify/admin/sso/microsoft-entra-id/saml.mdx

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,23 @@ Create explicit SAML claims in Entra with the names Cube uses by default.
7272
- **Display name** — Set **Name** to `name` and **Source attribute** to
7373
`user.displayname`.
7474

75+
If you plan to map Cube roles based on Entra group membership (see
76+
[Map roles by group](#map-roles-by-group) below), also add a group claim:
77+
78+
1. Still in **Attributes & Claims**, click **Add a group claim**.
79+
2. Choose which groups to include (e.g. **Security groups** or **Groups
80+
assigned to the application**) and pick a **Source attribute** for the
81+
group name. For most setups, select **sAMAccountName** or
82+
**Cloud-only group display names** so the assertion carries
83+
human-readable group names that match the **IdP group name** values
84+
you'll configure in Cube Cloud.
85+
3. Save the claim.
86+
87+
Cube reads Entra's canonical groups claim URL
88+
(`http://schemas.microsoft.com/ws/2008/06/identity/claims/groups`)
89+
automatically, so no further attribute renaming is required on the
90+
Entra side.
91+
7592
## Complete configuration in Cube
7693

7794
Return to the SAML configuration page in Cube and provide the identity
@@ -148,6 +165,61 @@ the user's role manually in Cube under **Team & Security**.
148165

149166
</Info>
150167

168+
## Map roles by group
169+
170+
For finer-grained role assignment, enable **Map roles by group** in the
171+
**Advanced Settings** section to assign Cube roles based on a user's
172+
Entra group memberships.
173+
174+
To configure group-based role mapping:
175+
176+
1. Make sure Entra sends a group claim on the SAML assertion. See the
177+
group-claim step in [Configure attribute
178+
mappings](#configure-attribute-mappings).
179+
2. In the SAML configuration form in Cube, expand **Advanced Settings**.
180+
3. (Optional) Under **SAML attribute customization**, set the **Groups
181+
attribute** to the simple name of the SAML attribute carrying group
182+
memberships. Defaults to `groups`. Cube also reads Entra's canonical
183+
groups claim URL automatically, so the default usually works
184+
out of the box.
185+
4. Enable the **Map roles by group** toggle.
186+
5. Click **Add group mapping** and create one entry per group you want
187+
to map:
188+
- **IdP group name** — the group display name as it appears in the
189+
assertion (case-insensitive). With **Source attribute** set to
190+
**sAMAccountName** or **Cloud-only group display names**, this is
191+
the human-readable group name. If you left the default (group object
192+
ID), use the GUID instead.
193+
- **Cube role** — pick a default or [custom role][ref-custom-roles].
194+
195+
How it's applied:
196+
197+
- On every SAML SSO login, Cube reads the user's groups from the SAML
198+
assertion and assigns the mapped role for each group that matches.
199+
- Group mapping is **additive**: roles are added on every login, but a
200+
user is never demoted on subsequent logins (e.g. removing them from an
201+
Entra group does not strip the corresponding Cube role — adjust the
202+
user's roles in Cube manually).
203+
- Users whose groups don't match any entry still receive the
204+
[default role](#default-role-for-new-users) on first login.
205+
- The **Default role for new users** picker continues to apply at
206+
provisioning time as the always-on baseline.
207+
208+
The same `groupsRolesMap` is also consumed by [SCIM][ref-scim] when
209+
groups are pushed and members are added, so a single configuration drives
210+
both SAML SSO and SCIM group sync.
211+
212+
<Info>
213+
214+
The legacy `rolesMap` setting (a translation from raw IdP role values to
215+
Cube role names, applied to the **Role attribute**) continues to work
216+
and is applied **in addition to** `groupsRolesMap`. They read different
217+
SAML attributes (`role` vs. `groups`) and can be used side by side —
218+
typical setups using Entra App Roles for the role attribute and Entra
219+
security groups for the group attribute.
220+
221+
</Info>
222+
151223
## Assign users
152224

153225
Make sure the new Enterprise Application is assigned to the relevant

docs-mintlify/admin/sso/microsoft-entra-id/scim.mdx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,27 @@ Users**.
8484

8585
</Info>
8686

87+
## Map roles by SCIM group
88+
89+
If you have configured [Map roles by group][ref-saml-map-roles-by-group]
90+
on the SAML setup page, the same `groupsRolesMap` is applied whenever
91+
SCIM provisions group memberships from Entra:
92+
93+
- When Entra adds a user to a synchronized group, Cube looks up the
94+
group's **display name** (case-insensitive) in the configured mapping
95+
and assigns the corresponding Cube role to that user.
96+
- Role assignment is **additive**: a user is never demoted on subsequent
97+
group sync. Removing a user from an Entra group does not strip the
98+
corresponding Cube role — adjust the user's roles in Cube manually.
99+
- The match is on the SCIM group **display name** that Entra pushes (the
100+
`displayName` attribute in the **Group** mapping), not the group
101+
object ID. Make sure the **IdP group name** entries in Cube match
102+
exactly (case-insensitive) what Entra sends.
103+
104+
No separate configuration is required on the SCIM side — once the
105+
mapping is defined on the SAML page, it drives both SAML SSO login and
106+
SCIM group sync.
107+
87108
## Syncing user attributes
88109

89110
You can sync [user attributes][ref-user-attributes] from Microsoft Entra to
@@ -126,5 +147,6 @@ provisioned as [user attributes][ref-user-attributes] in Cube.
126147

127148
[ref-saml]: /admin/sso/microsoft-entra-id/saml
128149
[ref-saml-default-role]: /admin/sso/microsoft-entra-id/saml#default-role-for-new-users
150+
[ref-saml-map-roles-by-group]: /admin/sso/microsoft-entra-id/saml#map-roles-by-group
129151
[ref-custom-roles]: /admin/users-and-permissions/custom-roles
130152
[ref-user-attributes]: /admin/users-and-permissions/user-attributes

docs-mintlify/admin/sso/okta/saml.mdx

Lines changed: 68 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,24 @@ user attributes from Okta to Cube Cloud:
5757
2. Scroll down to the **Attribute statements** section.
5858
3. Click **Add expression** and create the following entries:
5959

60-
| Name | Expression |
61-
| ------- | ------------------------- |
62-
| `email` | `user.profile.email` |
63-
| `name` | `user.profile.firstName` |
60+
| Name | Expression |
61+
| ------- | ------------------------- |
62+
| `email` | `user.profile.email` |
63+
| `name` | `user.profile.firstName` |
64+
65+
4. If you plan to map Cube roles based on Okta group membership (see
66+
[Map roles by group](#map-roles-by-group) below), also add a **Group
67+
Attribute Statement**. Scroll to the **Group Attribute Statements**
68+
section and add:
69+
70+
| Name | Filter |
71+
| -------- | --------------------- |
72+
| `groups` | **Matches regex** `.*` |
73+
74+
Adjust the filter to scope which groups Okta sends — e.g.
75+
**Starts with** `cube-` to limit the assertion to Cube-related groups.
76+
The attribute name must match the **Groups attribute** value configured
77+
in Cube Cloud (defaults to `groups`).
6478

6579
## Retrieve SAML details from Okta
6680

@@ -126,6 +140,56 @@ exists.
126140

127141
</Warning>
128142

143+
## Map roles by group
144+
145+
For finer-grained role assignment, enable **Map roles by group** in the
146+
**Advanced Settings** section to assign Cube Cloud roles based on a user's
147+
Okta group memberships.
148+
149+
To configure group-based role mapping:
150+
151+
1. Make sure Okta sends a group attribute statement on the SAML assertion.
152+
See step 4 of [Configure attribute statements in
153+
Okta](#configure-attribute-statements-in-okta).
154+
2. In the SAML configuration form in Cube Cloud, expand **Advanced
155+
Settings**.
156+
3. (Optional) Under **SAML attribute customization**, set the **Groups
157+
attribute** to the name of the SAML attribute you configured in Okta.
158+
Defaults to `groups`.
159+
4. Enable the **Map roles by group** toggle.
160+
5. Click **Add group mapping** and create one entry per group you want to
161+
map:
162+
- **IdP group name** — the Okta group **display name** exactly as it
163+
appears in the SAML assertion (case-insensitive).
164+
- **Cube Cloud role** — pick a default or [custom role][ref-custom-roles].
165+
166+
How it's applied:
167+
168+
- On every SAML SSO login, Cube Cloud reads the user's groups from the
169+
configured **Groups attribute** and assigns the mapped role for each
170+
group that matches.
171+
- Group mapping is **additive**: roles are added on every login, but a
172+
user is never demoted on subsequent logins (e.g. removing them from an
173+
Okta group does not strip the corresponding Cube role — adjust the
174+
user's roles in Cube Cloud manually).
175+
- Users whose groups don't match any entry still receive the
176+
[default role](#default-role-for-new-users) on first login.
177+
- The **Default role for new users** picker continues to apply at
178+
provisioning time as the always-on baseline.
179+
180+
The same `groupsRolesMap` is also consumed by [SCIM][ref-scim] when groups
181+
are pushed and members are added, so a single configuration drives both
182+
SAML SSO and SCIM group sync.
183+
184+
<Info>
185+
186+
The legacy `rolesMap` setting (a translation from raw IdP role values to
187+
Cube role names, applied to the **Role attribute**) continues to work
188+
and is applied **in addition to** `groupsRolesMap`. They read different
189+
SAML attributes (`role` vs. `groups`) and can be used side by side.
190+
191+
</Info>
192+
129193
## Test SAML authentication
130194

131195
1. Copy the **Single Sign-On URL** from the SAML configuration page

docs-mintlify/admin/sso/okta/scim.mdx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,30 @@ this is the **Viewer** role; to choose a different default role (including
129129

130130
The default role only applies to users created by SCIM (`POST
131131
/api/scim/v2/Users`). Existing users are not modified by subsequent SCIM
132-
profile or group updates.
132+
profile updates.
133+
134+
## Map roles by SCIM group
135+
136+
If you have configured [Map roles by group][ref-saml-map-roles-by-group]
137+
on the SAML setup page, the same `groupsRolesMap` is applied whenever
138+
SCIM pushes group memberships:
139+
140+
- When Okta adds a user to a pushed group, Cube Cloud looks up the
141+
group's **display name** (case-insensitive) in the configured mapping
142+
and assigns the corresponding Cube Cloud role to that user.
143+
- Role assignment is **additive**: a user is never demoted on subsequent
144+
group sync. Removing a user from an Okta group does not strip the
145+
corresponding Cube Cloud role — adjust the user's roles in Cube Cloud
146+
manually.
147+
- The match is on the **group display name** that Okta pushes via SCIM,
148+
not the Okta group ID. Make sure the **IdP group name** entries in
149+
Cube Cloud match exactly (case-insensitive) what Okta sends.
150+
151+
No separate configuration is required on the SCIM side — once the
152+
mapping is defined on the SAML page, it drives both SAML SSO login and
153+
SCIM group sync.
133154

134155
[ref-saml]: /admin/sso/okta/saml
135156
[ref-saml-default-role]: /admin/sso/okta/saml#default-role-for-new-users
157+
[ref-saml-map-roles-by-group]: /admin/sso/okta/saml#map-roles-by-group
136158
[ref-custom-roles]: /admin/users-and-permissions/custom-roles

0 commit comments

Comments
 (0)