Skip to content

Add lower-bound validation on SCIM count parameter#50887

Merged
ssilvert merged 1 commit into
keycloak:mainfrom
sguilhen:50471-scim-count-lower-bound
Jul 15, 2026
Merged

Add lower-bound validation on SCIM count parameter#50887
ssilvert merged 1 commit into
keycloak:mainfrom
sguilhen:50471-scim-count-lower-bound

Conversation

@sguilhen

Copy link
Copy Markdown
Contributor

Closes #50471

Closes keycloak#50471

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
Copilot AI review requested due to automatic review settings July 14, 2026 15:18
@sguilhen
sguilhen requested a review from a team as a code owner July 14, 2026 15:18
@sguilhen
sguilhen requested a review from martin-kanis July 14, 2026 15:18

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.

Pull request overview

Note

Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.

Adds lower-bound handling for SCIM pagination count so negative values don’t cause invalid paging behavior, and verifies it with TCK tests.

Changes:

  • Clamp SCIM count to a minimum of 0 for user and group searches.
  • Add new pagination tests covering negative count for users and groups.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
scim/tests/base/src/test/java/org/keycloak/tests/scim/tck/PaginationTest.java Adds TCK tests asserting behavior when count is negative.
scim/model/src/main/java/org/keycloak/scim/model/user/UserResourceTypeProvider.java Clamps count to >= 0 before applying default max results.
scim/model/src/main/java/org/keycloak/scim/model/group/GroupResourceTypeProvider.java Same clamping logic for group searches.

@ssilvert
ssilvert merged commit def1097 into keycloak:main Jul 15, 2026
91 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: Missing lower-bound validation on count parameter in list operations

3 participants