Repository navigation
Description
Enhancement Description
Let a SCIM group POST and PUT carry a full members list when the caller is the SCIM client that created the group. Today PUT /Groups/{id} with members is refused (#46216). That leaves Okta applications built with the App Integration Wizard unable to push group membership: after the first push they send every change as a full-list PUT, and they cannot be switched to PATCH (captures on #53130).
Accepting PUT as a plain replace for every caller would let one SCIM client remove members another client added. Here only the owner writes the group's members. The SCIM client that creates a group owns it, and its membership is what the owner last sent. Another SCIM client cannot change or delete it.
#53130 covers creating a group with initial members and keeps PUT restricted. This issue is about PUT. It changes POST only inside the opt-in mode, where creating a group with members makes the caller its owner.
Value Proposition
Organisations that provision Keycloak from Okta through a wizard-built SCIM app can push groups with members. Today that only works for groups that are empty at their first push.
A group a directory pushes has one source, which matches how Okta describes group push: once a group is pushed, Okta becomes the group source.
Goals
- Accept
membersonPOST /Groups. The group is created with them, and the calling client becomes its owner. The calling client is the client the access token was issued to. - The owner can
PUTa full member list, andPATCHadd,removeandreplaceonmembers, including aremovewith avaluelist as Microsoft Entra ID sends it. Members not in a full list leave the group, except service accounts and administrators, which SCIM cannot manage and which stay. - Every member in a request is checked before anything changes. One invalid member, including one that no longer exists in Keycloak, rejects the whole request.
- Another SCIM client gets a 403 when it tries to change or delete an owned group.
- A user's
groupscannot add or remove a membership of an owned group, as RFC 7643 section 4.1.2 describes, so an owned group has one write path. - Ownership is held by client ID, so a client deleted and created again with the same client ID owns its groups again.
- A SCIM read shows every member.
- Off by default, behind an experimental feature
scim-group-membership-claimsand the realm attributescimGroupMembershipClaims. With either one off, behaviour is unchanged.
Non-Goals
- Changing anything for realms that do not turn this on, including
PATCHreplaceonmembersoutside this mode (SCIM PATCH "replace" on unfiltered members/groups path never removes stale entries #52752). - Changing groups that no SCIM client created. They keep today's behaviour, and a client cannot take ownership of them.
- Refusing administrator changes to owned groups, and making identity provider and LDAP group mappers skip owned groups. Both are planned as separate follow-up changes. Until then, an owner's next full list overwrites an administrator's change.
- Tracking memberships stored outside the Keycloak database, for example through an LDAP group mapper. A request that would create or remove one is refused.
Discussion
Notes
Storage is one table, SCIM_GROUP_OWNER (group, client ID), removed with its group.
An earlier version of this proposal recorded which SCIM client added each member, so that several clients and administrators could share one group. Review found most of its problems in that bookkeeping, so the proposal and #55342 now use one owner per group.
AI assistance: this was prepared with Claude Code, an AI coding agent. I have reviewed it and will handle the follow-up.
Metadata
Metadata
Assignees
Labels
Type
Fields
Value
Effort
Votes
Projects
- StatusShow more project fieldsOpen
Activity
Accept a SCIM group PUT with members from the SCIM client that owns t…
[-]SCIM: accept a group's full member list on PUT by tracking members per SCIM client[/-][+]SCIM: accept a group's full member list on PUT from the SCIM client that owns the group[/+]