Repository navigation
fix(account): don't drop application.client from the kcContext - #1049
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe serializer now permits ChangesApplications client serialization
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The mechanism introduced in 61e56ec (released in v11.9.13) to keep Keycloak internals out of the kcContext discards any object whose class lives under `org.keycloak.models`. On the `applications.ftl` page of the multi page account theme each `applications.applications[i].client` is a `ClientModel`, so the whole object was dropped. `Applications.tsx` dereferences `application.client.clientId` inside a `.map` without a guard, so the page doesn't merely lose data, it throws `TypeError: Cannot read properties of undefined (reading 'name')` and renders nothing at all. That page is meant to expose the client, so this is a false positive rather than an internal leaking out. Add an exception scoped to that exact path, next to the existing `OTPPolicy` and `RequiredActionProviderModel` ones. Matching on the path rather than on the class name keeps the exception narrow: a `ClientModel` reached through any other path, or on any other page, is still filtered out, and `client.realm`, `client.container`, `client.secret` and the `*Stream` properties remain excluded by the pre-existing rules. Verified end to end on Keycloak 26.7.0 with the multi page account theme. Fixes keycloakify#1040
83ba80b to
0f71da0
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
@garronej this is ready whenever you have a moment — the |
|
Sorry for the delay |
On the
applications.ftlpage of the Multi-Page account theme, everyapplication.clientis aClientModel, so theorg.keycloak.modelsblocklist dropped it. The stockApplicationspage then throws onapplication.client.clientIdand renders nothing.Adds an exception scoped to that exact path, next to the existing
OTPPolicyone. Verified end to end on Keycloak 26.7.0.Fixes #1040
Summary by CodeRabbit