Repository navigation
Match client policy source groups by full group path - #52608
Conversation
There was a problem hiding this comment.
🟡 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.
e3167d6 to
910696f
Compare
There was a problem hiding this comment.
🟡 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
910696f to
55ff985
Compare
There was a problem hiding this comment.
🟡 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>
55ff985 to
1fc8d14
Compare
There was a problem hiding this comment.
🟡 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
| 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 |
There was a problem hiding this comment.
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).
Closes #51281
The
client-updater-source-groupscondition matched the groups by simple name, but group names are not unique,/topGroupand/other/topGroupwere 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
topGroupkeeps 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?