feat: scim group and user provisioning - #8096
Conversation
5c05cdb to
7985e93
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces SCIM user and group provisioning, including database migrations, GraphQL schema updates, backend stores, and a frontend dashboard for managing groups and role mappings. Feedback highlights critical SQL syntax errors in GroupStore due to unclosed comments, and a tenant isolation vulnerability in disableGroup where updates are performed without filtering by organization. Additionally, the frontend Groups component has potential runtime crashes from unsafe property access on loading states, and contains unused mock data and placeholder alerts. Performance improvements are suggested to remove unnecessary async allocations in batch mapping functions, and database integrity can be enhanced by adding unique constraints and indexes to the migration.
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tags: |
aa43180 to
02e2a39
Compare
18f1cab to
d984c8c
Compare
43ed083 to
c89cf3d
Compare
|
👋 Hi — really appreciate this SCIM work; it's been solid to integrate against. While validating against the SCIM 2.0 spec (RFC 7643/7644) we came across a few upstream observations we thought would be useful to share: SCIM 2.0 conformance
Personal access tokens don't honor provisioned-user group permissionsThe session correctly resolves a provisioned user's permissions from groups ( Also, question: Is single-org the intended model for SCIM-provisioned users, or is cross-org membership something you're planning to support? |
|
To add some context on Aisha's last point, our main use case for multi-org SCIM users is for Platform Operators: the team that manages all organizations on the platform i.e. setting up OIDC, etc. We could work around this by keeping Platform Operators as SSO-only users outside SCIM, but if we're externalizing all user management to SCIM then ideally Platform Operators should be managed through the same automated provisioning/deprovisioning path. |
7b0c0d0 to
1db6ac2
Compare
|
@mish-elle @iftika1 This PR focuses on provisioning users for organizations, not platform operators (which is out of scope here). It is intentional that all provisioned users are restricted/jailed to the provisioned organization. @iftika1 I addressed the I still feel hesitant in including the Could you succeed testing the integration against your SCIM provider, or were the issues you described (missing |
|
@n1ru4l Appreciate the quick followup. Unfortunately, |
b59c825 to
f4dd0ee
Compare
caba8d0 to
83f43ed
Compare
|
@iftika1 I did a lot of improvements to the SCIM implementation, including the groups property. Could you please re-evaluate whether the endpoints now correctly work with your provider? |
3678763 to
3929cf7
Compare
There was a problem hiding this comment.
just refactoring to use the new flow test helper instead of the local mutation.
There was a problem hiding this comment.
extensive test suite of all the scim endpoints and scim user restrictions (jail, ownership transfer etc.)
There was a problem hiding this comment.
just refactoring to use the new flow test helper instead of the local mutation.
…eOIDCIntegrationInput.oidcForVerifiedDomainsRequired` fields from `UpdateOIDCIntegrationInput` to ` UpdateOIDCRestrictionsInput`
…ing scim provisioning
and pathless operations
…ce; make user and group lookup via secondary attributes case insensitive
8ed345f to
905f413
Compare
Description
This PR implements #2993, which adds:
What is still missing to get this released?
I want to cleanup the logic for creating users which is right now split into our old storage module and also the new users store I introducedTesting the Changes
http://localhost:3001/scim/v2/for provisioning users and groups.scim:provision). Send it via Bearer authentication (Header:Authorization: Bearer ACCESS_TOKEN).Notes on the SCIM Endpoints
Currently, the SCIM endpoints has only been field tested against a Okta custom integration (Note: Okta also has integration network integration, which have different behaviour. More info here).
A quite extensive integration test suite exists for the endpoints (based on example payloads shared both in the documentation provided by Okta and Entra), though we can only gain 100% confidence by actually running a manual provisioning test against each identity provider as the protocol implementations and usages are quite a bit messy.
The endpoints are implemented as defensive as possible in an attempt to support a large variety of quirks the identity providers could have when calling the endpoints.
Notes on Groups
externalIdin SCIM, it seems that both Okta and Entra do not use anexternalIdand instead map the group via thedisplayNameinstead, thus in our implementation providing aexternalIdis optional and thedisplayNamewill be used as the unique property for detecting conflicts if not provided.Resource Links
Checklist