Repository navigation
Conversation
02958bf to
5947f2f
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The tests lack a successful allowlisted legacy-name normalization case, so removing normalization would not be caught.
1 open issue
What changed in this PR
This PR addresses #54456 by applying the Allowed Client Scopes registration policy to deprecated clientTemplate requests, closing a bypass of administrator-configured scope restrictions.
Changes:
- Normalize legacy template names before checking the scope allowlist.
- Add registration tests for blocked legacy names and an allowed scope.
- Document the policy change and upgrade considerations.
| File | Description |
|---|---|
tests/base/src/test/java/org/keycloak/tests/client/ClientRegistrationPoliciesTest.java |
Adds parameterized legacy-template registration tests. |
services/src/main/java/org/keycloak/services/clientregistration/policy/impl/ClientScopesClientRegistrationPolicy.java |
Checks normalized legacy template names against allowed scopes. |
docs/guides/securing-apps/client-registration.adoc |
Documents legacy-template policy enforcement. |
docs/documentation/upgrading/topics/changes/changes-27_0_0.adoc |
Explains rejection behavior, existing assignments, and upgrade requirements. |
Review effort: Balanced
5947f2f to
89cc43d
Compare
There was a problem hiding this comment.
@graziang That's good point.
I think that for now, it makes sense to include this fix in main as it is not 100% sure that we manage to remove clientTemplate support in KC 27 (hopefully yes).
I've created an issue #55219 and added a note about reverting those changes from main (including upgrading guide note) in case that clientTemplate is going to be removed.
For now, I am approving the PR. Hopefully can be backported to 26.8 once merged. I've rebased the PR, hopefully that helps with "SAST" tests.
Closes keycloak#54456 Signed-off-by: Lukas Hanusovsky <lhanusov@redhat.com>
89cc43d to
5c8f2ff
Compare
Closes #54456
Co-authored: Codex noreply@openai.com