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. |
…ganizationand add a flag to enforce login through oidc
…equired" flags via the GraphQL API; implement guard for "oidcForVerifiedDomainsRequired" when another oidc integration attempts to create an user with a domain registered for another organization
…zation.groups" and "Mutation.addGroupMappingToGroup"
…pMapping" with tests
… Storage.ensureUserExists. This change should resolve the situation for now and makes the test for auto-updating the oidc provider email pass. I still to refactor that code to be cleaner though
…r role assignments to avoid test flakiness
…ions and a disabled user is not able to log in
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, |
… provider requirements
…olving effective permissions and resources for personal access tokens
Description
This PR implements #2993, which adds:
What is still missing to get this released?
Testing the Changes
http://localhost:3001/scim/v2/for provisioning users and groups.member:modify). 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