8000 ClientUpdaterSourceGroupsCondition and ClientUpdaterSourceRolesCondition prevent usage of CIMD by reda-alaoui · Pull Request #52601 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

ClientUpdaterSourceGroupsCondition and ClientUpdaterSourceRolesCondition prevent usage of CIMD - #52601

Open
reda-alaoui wants to merge 3 commits into
keycloak:mainfrom
Cosium:issue-52152
Open

reda-alaoui wants to merge 3 commits into
keycloak:mainfrom
Cosium:issue-52152

Conversation

@reda-alaoui
Copy link
Copy Markdown
Contributor

Closes #52152

@reda-alaoui
reda-alaoui marked this pull request as ready for review September 9, 2026 20:47
@reda-alaoui
reda-alaoui requested a review from a team as a code owner September 9, 2026 20:47
Copilot AI balanced review requested due to automatic review settings September 9, 2026 20:47
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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

Fixes Keycloak issue #52152 where configuring ClientUpdaterSourceGroupsCondition / ClientUpdaterSourceRolesCondition could break Client ID Metadata Document (CIMD) create/update flows by throwing on non-CRUD contexts.

Changes:

  • Update source-groups/roles client policy conditions to avoid throwing on unexpected context types.
  • Add CIMD create/update regression tests covering both groups and roles conditions.
  • Generalize the redirect-uris policy helper to support a configurable condition provider/config.

Reviewed changes

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

File Description
tests/base/src/test/java/org/keycloak/tests/client/policies/ClientIdMetadataDocumentTest.java Adds regression tests for CIMD with updater-source conditions and extends a policy helper to accept a pluggable condition.
services/src/main/java/org/keycloak/services/clientpolicy/condition/ClientUpdaterSourceRolesCondition.java Avoids throwing ClientPolicyException on unsupported context types by returning a vote instead.
services/src/main/java/org/keycloak/services/clientpolicy/condition/ClientUpdaterSourceGroupsCondition.java Avoids throwing ClientPolicyException on unsupported context types by returning a vote instead.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@reda-alaoui
reda-alaoui marked this pull request as draft September 24, 2026 13:48
@reda-alaoui
reda-alaoui marked this pull request as ready for review September 24, 2026 13:52
Copilot AI review requested due to automatic review settings September 24, 2026 13:52
…ion prevent usage of CIMD

Closes keycloak#52152

Signed-off-by: Réda Housni Alaoui <reda-alaoui@hey.com>
Signed-off-by: Réda Housni Alaoui <reda-alaoui@hey.com>
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 AI review requested due to automatic review settings September 24, 2026 14:02
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 review overview

🟢 Approval recommended

The focused behavior change is covered by regression tests, with no unresolved issues.

Review effort: Balanced
Findings: None

# Conflicts:
#	tests/base/src/test/java/org/keycloak/tests/client/policies/ClientIdMetadataDocumentTest.java
Copilot AI balanced review requested due to automatic review settings December 5, 2026 00:37
@reda-alaoui
Copy link
Copy Markdown
Contributor Author

@mposolda @graziang could one of you review this? It fixes #52152: ClientUpdaterSourceGroupsCondition and ClientUpdaterSourceRolesCondition prevented creating or updating clients through CIMD. I've just merged main to resolve the conflicts. ClientIdMetadataDocumentTest covers both conditions on CIMD create and update, and passes locally.

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 remain for the changes addressing group- and role-based policy conditions in CIMD registration and updates.

No open issues 🎉

Review effort: Balanced

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.

[CIMD] ClientUpdaterSourceGroupsCondition and ClientUpdaterSourceRolesCondition prevent usage of CIMD

2 participants

0