8000 Fix admin event paths when request realm casing differs by Aschenbath · Pull Request #55226 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Fix admin event paths when request realm casing differs - #55226

Draft
Aschenbath wants to merge 1 commit into
keycloak:mainfrom
Aschenbath:fix/admin-event-realm-path-55222
Draft

Aschenbath wants to merge 1 commit into
keycloak:mainfrom
Aschenbath:fix/admin-event-realm-path-55222

Conversation

@Aschenbath
Copy link
Copy Markdown

Use the realm name matched in the request so admin-event resource paths stay relative to the realm when a case-insensitive database accepts different casing. Shared extraction preserves the casing of decoded resource names and IDs in both API versions and keeps unmatched paths intact.

The regressions invoke the builders in real server sessions with the resolved realm model, so they also run on case-sensitive databases. They cover both URI overloads, decoded paths and trailing slashes; the admin-event documentation now describes the path semantics.

Closes #55222

Validation on Windows with JDK 17, the distribution server and H2 (dev-mem): AdminEventTest passed 15 tests and AdminEventV2Test passed 7, with no failures or skips. Before the fix, both mixed-case regressions failed while their same-case controls passed. mvnw.cmd -Pspotless spotless:apply and mvnw.cmd -Pspotless spotless:check passed.

AI assistance: Codex generated the implementation, regression tests and documentation.

Use the realm matched in the request to derive resource paths for both Admin API versions.

Closes keycloak#55222

Signed-off-by: Nash Aschenbath <wwh86696@163.com>
@ahus1
ahus1 commented Nov 16, 2026
Copy link
Copy Markdown
Member

Putting this one on hold. Let's first agree on the solution in the parent.

@ahus1 ahus1 self-assigned this Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/hold PR should not be merged. On hold for later. team/core-iam team/core-shared

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin events record an incorrect resource path when realm name casing differs in the request

2 participants

0