8000 kcreg can target the wrong client when a client ID contains spaces · Issue #55551 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

kcreg can target the wrong client when a client ID contains spaces #55551

Backlog

Description

@Pepo48

Describe the bug

The Keycloak Client Registration CLI (kcreg) uses form encoding for client IDs in URL path segments. When an ID contains a space, the CLI sends a literal + in the request path. The server can fail to find the requested client or resolve a different client. This affects get, delete, and the read and write requests in merge-mode update.

Version

Verified in Keycloak 26.8.2 using the compiled keycloak-admin-cli module and a local HTTP test server.

Expected behavior

The CLI should encode client IDs as URL path segments so that each request targets the exact ID supplied by the caller.

Actual behavior

The local HTTP test server received a literal + in the URL path where the supplied client ID contained a space. The Keycloak server applies its normal authorization checks to whichever client the request resolves.

How to Reproduce?

  1. Use a local HTTP test server to capture the request path for a kcreg get request with a test client ID containing a space.
  2. Check how the space is encoded. The request path contains + where it should contain %20.

This issue was originally tracked in the private repository. Migrated by @Pepo48.

Activity

  1. added
    kind/bug
    priority/important
    area/admin/cli
    on Nov 25, 2026
  2. added theissue type on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/admin/clikind/bugpriority/importantteam/cloud-native

    Type

    Fields

    No fields configured for bug.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0