docs: add cloud guide for syncing IdP groups to database roles [DNM]#37713
Conversation
mtabebe
left a comment
There was a problem hiding this comment.
Just from a technical POV, this looks good to me. I had one slight nit but don't know that it should be corrected
|
|
||
| ## Limitations | ||
|
|
||
| * **Roles beginning with `mz_` or `pg_` are never mapped.** These prefixes are |
There was a problem hiding this comment.
There are other ones as well (e.g., current_user, session_user, user, public) I don't know how specific we want to get
There was a problem hiding this comment.
We should list all of them in the docs. I'll make an update.
There was a problem hiding this comment.
Good catch. Checked is_reserved_role_name in src/adapter/src/catalog.rs. Full set is: prefixes mz_, pg_, external_; the PUBLIC role; and the role-spec keywords current_user, current_role, session_user, user, none. Updated the Limitations section to list all of them (case-insensitive match).
2a4f918 to
1154473
Compare
|
|
| ## Group sync | ||
|
|
||
| As an **Organization admin**, you can provision groups from your identity | ||
| provider via SCIM and map them to Materialize database roles, so that database |
There was a problem hiding this comment.
maybe include "existing" Materialize database roles?
|
|
||
| ## Limitations | ||
|
|
||
| * **Reserved role names are never mapped.** Groups whose names collide with |
There was a problem hiding this comment.
I would actually mention this point last.
|
|
||
| As an **Organization admin**, you can provision groups from your identity | ||
| provider via SCIM and map them to Materialize database roles, so that database | ||
| permissions are managed from your identity provider. |
There was a problem hiding this comment.
So ... it's not exactly permissions, yes? it's more the database role membership?
| * Groups you select in your IdP are provisioned into your Materialize | ||
| organization via [SCIM](https://scim.cloud/), along with their members. |
There was a problem hiding this comment.
Just trying to flesh out couple of things:
Let's say in my IdP, I have analysts group and someoneNewToMZ as a member.
- Double checking that when
someoneNewToMZfirst log in, we'll still create the corresponding db role, yes? - If we don't set the Organization role for
analystsgroup, what actually happens withsomeoneNewToMZ? anything? or is just not being an OrgAdmin the main thing?
There was a problem hiding this comment.
When someoneNewToMz signs in for the first time, assuming their coming from SSO, we will create their role, if they user's claim groups contains analysts then they will be assigned the analyst role.
Frontegg specifics... For roles we have Organization Admins and Organization Members. The only way to get superuser in cloud MZ is to have the role Organization Admins. It is possible, using the frontegg admin portal we provide to customers, to associate one of these roles with a group in a way that all users with that group will get that role assigned automatically. For instance, an upstream IDP group materialize_admin can sink to MZ using SCIM, and an admin user can set it so those people also get assigned the Organization Admins role and thus will be superuser. This was part was actually possible prior to this and we use it to manage some of our dog food environments.
There was a problem hiding this comment.
Yup ... so, am trying to see if we could end up with users that have no org role by having someone who has not been manually invited to the MZ org but is in the sync'ed group's member list.
Is this possible? and if an admin user does not update the sync'ed analysts to have an organization role, then, someoneNewToMZ, on first signing in, will have their db role created, and be assigned analyst role but will not be associated with any Org role?
There was a problem hiding this comment.
or by default, are people all Org members?
| Console under **Account** > **Account Settings** > **Groups**, marked with a | ||
| SCIM badge. Groups pushed from your IdP are read-only in Materialize and must | ||
| be managed from the IdP. | ||
|
|
There was a problem hiding this comment.
Wondering ... should we include a step here where people edit to set the organization role? Related to the above question about what happens if someone isn't either an Org Admin/Member ?
| This means you can manage who has access to what in Materialize from your IdP. | ||
| When a team member joins, leaves, or changes teams, updating their group | ||
| membership in the IdP updates their database permissions, with no manual | ||
| `GRANT` or `REVOKE` statements required. |
There was a problem hiding this comment.
we might want to add a blurb w.r.t. its scope (that is, roles you grant manually aren't revoked via syncs.)
| Groups pushed from your IdP are managed in the IdP. You can also create and | ||
| manage groups directly: | ||
|
|
||
| * **Materialize Console**: Navigate to **Account** > **Account Settings** > |
There was a problem hiding this comment.
So ... manually created groups ... they won't sync, right? since they won't be in the Idp's token group claim?
37d071f to
ea7c08a
Compare
| * Groups you select in your IdP are provisioned into your Materialize | ||
| organization via [SCIM](https://scim.cloud/), along with their members. |
There was a problem hiding this comment.
Yup ... so, am trying to see if we could end up with users that have no org role by having someone who has not been manually invited to the MZ org but is in the sync'ed group's member list.
Is this possible? and if an admin user does not update the sync'ed analysts to have an organization role, then, someoneNewToMZ, on first signing in, will have their db role created, and be assigned analyst role but will not be associated with any Org role?
| * Groups you select in your IdP are provisioned into your Materialize | ||
| organization via [SCIM](https://scim.cloud/), along with their members. |
There was a problem hiding this comment.
or by default, are people all Org members?
|
|
||
| Once pushed, the groups and their memberships appear in the Materialize | ||
| Console under **Account** > **Account Settings** > **Groups**, marked with a | ||
| SCIM badge. Groups pushed from your IdP are read-only in Materialize and must |
There was a problem hiding this comment.
oh, except for the Org admin/member thing, yes? It's just the members list?
Document the new SCIM group provisioning and group-to-role mapping feature for Materialize Cloud: creating a SCIM connection in the console, selecting which IdP groups to push, creating matching database roles, sync-at-connection semantics, and managing groups via the console or the Terraform provider. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ea7c08a to
365c530
Compare
Motivation
Documents the new SCIM group provisioning and group-to-role mapping feature for Materialize Cloud (design: #35899). There are currently no user-facing docs for this feature.
Changes
Adds a new page under
security/cloud/users-service-accounts/:mz_role_members(grantormz_jwt_sync) andmz_audit_events.mz_/pg_-prefixed roles never mapped, no role auto-creation, not real time.materialize_scim_config,materialize_scim_group,materialize_scim_group_users,materialize_scim_group_roles).Also links the new page from the security index and the user/service accounts index, and adds Console/Okta screenshots.
The page is marked private preview with the contact-us enablement note.
Tips for reviewer
Rendered locally with Hugo, all images and links resolve.
Checklist
$T ⇔ Proto$Tmapping (possibly in a backwards-incompatible way), then it is tagged with aT-protolabel.🤖 Generated with Claude Code