8000 Match client policy source groups by full group path by graziang · Pull Request #52608 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Match client policy source groups by full group path - #52608

Merged
mposolda merged 1 commit into
keycloak:mainfrom
graziang:issue-51281
Sep 11, 2026
Merged

mposolda merged 1 commit into
keycloak:mainfrom
graziang:issue-51281

Conversation

@graziang
Copy link
Copy Markdown
Contributor

Closes #51281

The client-updater-source-groups condition matched the groups by simple name, but group names are not unique, /topGroup and /other/topGroup were treated as the same group.

With the PR the condition now matches the full group path but values without a leading slash are still read as top level groups, so topGroup keeps matching /topGroup. Only conditions pointing at a subgroup by its leaf name need to be updated to the full path. I added a note in the breaking changes section.

Is this acceptable as a breaking change?

Copilot AI balanced review requested due to automatic review settings September 10, 2026 08:58
@graziang
graziang requested review from a team as code owners September 10, 2026 08:58
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.

🟡 Changes recommended

Default slash handling permits path collisions that leave a negative-logic authorization bypass possible.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates client policy group matching to use full paths, addressing duplicate-name authorization bypasses.

Changes:

  • Matches configured groups against user group paths.
  • Adds regression tests for duplicate names and subgroup paths.
  • Updates Admin UI guidance and upgrade documentation.
File summaries
File Description
ClientPoliciesConditionTest.java Adds group-path regression tests.
ClientUpdaterSourceGroupsCondition.java Implements full-path matching.
messages_en.properties Updates the configuration tooltip.
changes-26_8_0.adoc Documents the breaking change.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

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

Copilot AI review requested due to automatic review settings September 10, 2026 09:05
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.

🟡 Changes recommended

Distinct groups can still share a generated path when slash escaping is disabled, leaving an authorization bypass.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Copilot AI review requested due to automatic review settings September 10, 2026 09: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.

🟡 Changes recommended

Group resolution can be affected by admin permissions and no longer supports external or organization groups.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Closes keycloak#51281

Signed-off-by: Giuseppe Graziano <g.graziano94@gmail.com>
Copilot AI review requested due to automatic review settings September 10, 2026 09:41
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.

🟡 Changes recommended

The security-sensitive FGAP authorization-bypass behavior lacks regression coverage.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

@mposolda mposolda 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.

@graziang Thanks! Approved (with the comment related to changes.adoc )

Login failure data for brute force detection is now stored in the database by default, instead of only in the embedded Infinispan `loginFailures` cache. This ensures that temporarily locked-out users remain locked out across cluster restarts, and reduces memory consumption from accumulated login failure entries.

This change is controlled by the new `login-failures` versioned feature. The previous in-memory behavior (`login-failures:v1`) is deprecated. To restore it, set `--features=login-failures:v1`. Note that `login-failures:v1` is incompatible with the `stateless` feature.
=== Client policy source groups condition matches the full group path
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.

Not 100% sure if this is correct file (as the issue is supposed to be backported to the 26.7 as well and maybe we would have the 26.7 micro-release before the 26.8 release). But maybe we can change later if needed (as not 100% sure whether we would have new micro-release or not).

@mposolda mposolda self-assigned this Sep 11, 2026
@mposolda
mposolda merged commit dc0b572 into keycloak:main Sep 11, 2026
93 of 94 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.

[CVE-2026-18207] Source-group condition matches duplicate group names and can skip negative-logic enforcement

3 participants

0