Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The validation merge omits web-origin defaulting, allowing a description-only update to bypass a webOrigins pattern policy and persist a disallowed origin.
1 open issue
What changed in this PR
This PR addresses #53952 by extending the shared client URI catalog to revalidate stored values during partial updates, building on #54062.
Changes:
- Merge submitted URI fields with stored values for both secure URI executors.
- Add unit and integration tests for rejecting non-compliant stored URIs and accepting replacements.
- Document partial-update validation and upgrade implications.
| File | Description |
|---|---|
tests/base/src/test/java/org/keycloak/tests/client/policies/SamlClientUrisExecutorTest.java |
Tests stored URI revalidation under the HTTPS policy. |
tests/base/src/test/java/org/keycloak/tests/client/policies/ClientUrisPatternExecutorTest.java |
Tests partial updates under a URI pattern policy. |
services/src/test/java/org/keycloak/validation/ClientUriPolicyTest.java |
Covers stored and replacement URIs across update contexts. |
services/src/test/java/org/keycloak/validation/ClientUriFieldTest.java |
Tests URI merging and explicit clearing. |
services/src/main/java/org/keycloak/validation/ClientUriField.java |
Adds shared validation using proposed and stored values. |
services/src/main/java/org/keycloak/services/clientpolicy/executor/SecureClientUrisPatternExecutor.java |
Validates merged URI values on updates. |
services/src/main/java/org/keycloak/services/clientpolicy/executor/SecureClientUrisExecutor.java |
Uses merged URI values and effective redirect context. |
docs/documentation/upgrading/topics/changes/changes-27_0_0.adoc |
Explains stricter update validation after upgrading. |
docs/documentation/server_admin/topics/clients/client-policies.adoc |
Documents partial-update policy behavior. |
Review effort: Balanced
…xecutors Closes keycloak#53952 Signed-off-by: Giuseppe Graziano <g.graziano94@gmail.com>
graziang
force-pushed
the
issue-53952
branch
from
November 16, 2026 16:59
278a4db to
976cf16
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Before this PR on UPDATE both executors validated only the submitted representation, so URI fields omitted from a partial update kept their stored value unchecked.
RepresentationToModel.updateClientProperties, so an empty value clears the field and removes a non-compliant URI.Closes #53952