Skip to content

Enforce user-profile view permissions for SCIM reads and filters - #51548

Open
sguilhen wants to merge 1 commit into
keycloak:mainfrom
sguilhen:50987-scim-user-profile-view-bypass
Open

Enforce user-profile view permissions for SCIM reads and filters#51548
sguilhen wants to merge 1 commit into
keycloak:mainfrom
sguilhen:50987-scim-user-profile-view-bypass

Conversation

@sguilhen

@sguilhen sguilhen commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Closes #50987

@sguilhen
sguilhen requested a review from a team as a code owner August 7, 2026 17:30
Copilot AI balanced review requested due to automatic review settings August 7, 2026 17:30
@sguilhen
sguilhen requested a review from pedroigor August 7, 2026 17:30

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

Enforces user-profile visibility permissions for SCIM reads and filters.

Changes:

  • Filters SCIM schema attributes by profile permissions.
  • Updates existing SCIM tests for user-visible attributes.
  • Adds read and filter authorization coverage.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
AbstractScimTest.java Makes shared test attributes user-visible.
AuthorizationTest.java Adds permission regression tests.
UserTest.java Updates searchable custom-attribute permissions.
AbstractUserModelSchema.java Filters core schema mappings by visibility.
UserExtensionModelSchema.java Filters extension mappings by visibility.

Copilot AI review requested due to automatic review settings August 7, 2026 20:14
@sguilhen
sguilhen force-pushed the 50987-scim-user-profile-view-bypass branch from df76d84 to ae33693 Compare August 7, 2026 20:14

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Copilot AI review requested due to automatic review settings August 7, 2026 21:08
@sguilhen
sguilhen force-pushed the 50987-scim-user-profile-view-bypass branch from ae33693 to d25d4b6 Compare August 7, 2026 21:08
@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.adapter.servlet.SAMLClockSkewAdapterTest#testTokenTimeIsValid

Keycloak CI - Adapter IT Strict Cookies

org.jboss.arquillian.drone.impl.DroneTimeoutException: Drone creation request timed out after 60 seconds. Make sure that browser or remote server in case of remotely executed driver is running and communication with Drone haven't failed.
	at org.jboss.arquillian.drone.impl.DronePointContextImpl.instantiateDrone(DronePointContextImpl.java:240)
	at org.jboss.arquillian.drone.impl.DronePointContextImpl.getInstance(DronePointContextImpl.java:84)
	at org.jboss.arquillian.drone.impl.DroneTestEnricher.enrichTestClass(DroneTestEnricher.java:165)
	at org.jboss.arquillian.drone.impl.DroneTestEnricher.enrich(DroneTestEnricher.java:75)
...

Report flaky test

@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

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

scim/model/src/main/java/org/keycloak/scim/model/user/AbstractUserModelSchema.java:39

  • The new authorization regression maps only extension attributes, so it exercises UserExtensionModelSchema but not this core-schema resolver path. Add a core-mapped attribute with admin-only view permission and verify both reads and filters cannot access it.
        Set<String> names = new HashSet<>(profile.getAttributes().getReadable().keySet());

Closes keycloak#50987

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
Copilot AI review requested due to automatic review settings August 8, 2026 00:49
@sguilhen
sguilhen force-pushed the 50987-scim-user-profile-view-bypass branch from d25d4b6 to a1b29c8 Compare August 8, 2026 00:49

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

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 reads and filters bypass user-profile view permissions for mapped attributes

2 participants