Skip to content

SCIM: accept a group's full member list on PUT from the SCIM client that owns the group #55341

Description

@Prasad484

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 members on POST /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 PUT a full member list, and PATCH add, remove and replace on members, including a remove with a value list 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 groups cannot 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-claims and the realm attribute scimGroupMembershipClaims. With either one off, behaviour is unchanged.

Non-Goals

  • Changing anything for realms that do not turn this on, including PATCH replace on members outside 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

#55340

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.

Activity

  1. added
    area/scimSCIM — user and group provisioning, filtered search, PATCH operations
    status/labeled-by-botIssue type or area was assigned automatically by the triage bot
    on Nov 19, 2026
  2. added a commit that references this issue on Nov 19, 2026
    73c4ac3
  3. changed the title [-]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[/+] on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/scimSCIM — user and group provisioning, filtered search, PATCH operationskind/enhancementCategorizes a PR related to an enhancementstatus/labeled-by-botIssue type or area was assigned automatically by the triage botstatus/triageteam/core-iam

    Fields

    Value

    None yet

    Effort

    None yet

    Votes

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions