8000 Client baseUrl URI-scheme validation missing during realm and partial… by mposolda · Pull Request #51725 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Client baseUrl URI-scheme validation missing during realm and partial… - #51725

Merged
mposolda merged 1 commit into
keycloak:mainfrom
mposolda:50123-partial-import-client
Aug 14, 2026
Merged

mposolda merged 1 commit into
keycloak:mainfrom
mposolda:50123-partial-import-client

Conversation

@mposolda
Copy link
Copy Markdown
Contributor

… import

closes #50123

During full realm import OR during single client import, the client urls were already validated. The only missing "path" was the partial import, which is fixed in this PR

… import

closes keycloak#50123

Signed-off-by: mposolda <mposolda@gmail.com>
@mposolda
mposolda requested a review from a team as a code owner August 14, 2026 08:59
Copilot AI balanced review requested due to automatic review settings August 14, 2026 08:59
@mposolda mposolda self-assigned this Aug 14, 2026
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds client validation to partial imports, closing the remaining URI-scheme validation bypass.

Changes:

  • Validates fully imported clients before committing.
  • Returns HTTP 400 and rolls back invalid imports.
  • Adds integration coverage for a malicious javascript: base URL.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
services/src/main/java/org/keycloak/partialimport/ClientsPartialImport.java Validates clients during partial import.
tests/base/src/test/java/org/keycloak/tests/admin/partialimport/PartialImportClientTest.java Verifies rejection and rollback of an invalid client.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mposolda
Copy link
Copy Markdown
Contributor Author

@lhanusov Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client baseUrl URI-scheme validation missing during realm and partial import

3 participants

0