8000 Reject empty SCIM group members on PUT by akasakariko · Pull Request #54535 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Reject empty SCIM group members on PUT - #54535

Merged
pedroigor merged 1 commit into
keycloak:mainfrom
akasakariko:fix/scim-empty-group-members-put
Nov 6, 2026
Merged

pedroigor merged 1 commit into
keycloak:mainfrom
akasakariko:fix/scim-empty-group-members-put

Conversation

@akasakariko
@akasakariko akasakariko commented Nov 2, 2026 •
Copy link
Copy Markdown
Contributor

PUT /Groups/{id} accepts members: [] and reports success even though membership is unchanged

Reject any non-null members list with the existing 400 error while preserving updates that omit members
Extend the existing group replacement test to cover empty and nonempty lists and assert the error status

Closes #54530

Local validation

  • Reproduced before the fix with ./mvnw -B -ntp -pl scim/tests/base test -Dtest=GroupTest#testGroupMembersReplace — the empty-list case failed and the nonempty-list case passed
  • The same targeted command passes both cases after the fix
  • ./mvnw -B -ntp -pl scim/core,scim/model,scim/tests/base verify passes with 51 core tests and 292 integration tests passing, plus 2 existing disabled integration tests
  • ./mvnw -B -ntp -pl scim/model,scim/tests/base spotless:check passes
  • git diff --check origin/main...HEAD passes

AI assistance: Codex was used to investigate, implement, and validate this fix

Closes keycloak#54530

Signed-off-by: akasakariko <148060537+akasakariko@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 2, 2026 11:49
@akasakariko
akasakariko requested a review from a team as a code owner November 2, 2026 11:50
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@keycloak-github-bot keycloak-github-bot Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unreported flaky test detected, please review

@keycloak-github-bot
Copy link
Copy Markdown

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.oauth.ClientAuthSignedJWTTest#testUploadKeystorePKCS12

Keycloak CI - FIPS IT (non-strict)

jakarta.ws.rs.WebApplicationException: Create method returned status Internal Server Error (Code: 500); expected status: Created (201). Response body: {"error":"unknown_error","error_description":"For more on this error consult the server log."}
	at org.keycloak.testsuite.admin.ApiUtil.getCreatedId(ApiUtil.java:38)
	at org.keycloak.testsuite.oauth.AbstractClientAuthSignedJWTTest.recreateApp3(AbstractClientAuthSignedJWTTest.java:236)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at org.jboss.arquillian.junit.Arquillian$StatementLifecycleExecutor.invoke(Arquillian.java:372)
...

Report flaky test

Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the SCIM group update validation change.

No open issues 🎉

Review effort: Balanced

@pedroigor pedroigor left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @akasakariko.

@pedroigor
pedroigor merged commit a50ba94 into keycloak:main Nov 6, 2026
97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SCIM: PUT on a group with "members": [] returns 200 but removes nobody

3 participants

0