Thanks to visit codestin.com
Credit goes to github.com

Skip to content

keycloak hostname:v2 /admin used on "hostname" instead of "hostname-admin" #30432

@ahbonsu

Description

@ahbonsu

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

admin/ui

Describe the bug

when using the new hostname:v2, there are some /admin calls that do not use the "hostname-admin" url for example:

  • GET --> /admin/serverinfo
  • OPTIONS/GET --> /admin/realms/master/ui-ext/realms/names
  • OPTIONS/GET --> /admin/realms/master

Version

25.0.0

Regression

  • The issue is a regression

Expected behavior

All requests for resource path "/admin" should go to the "hostname-admin" defined host

Actual behavior

Some requests do use the hostname defined in "hostname" eventhough it's in the resource path /admin

How to Reproduce?

add an additional hostname to your localhost. in this example, I use "hostname2"

run
docker run --name kc -p 8080:8080 -e "KEYCLOAK_ADMIN=admin" -e "KEYCLOAK_ADMIN_PASSWORD=admin" -e "KC_HOSTNAME=http://localhost:8080" -e "KC_HOSTNAME_ADMIN=http://localhost2:8080" keycloak/keycloak:25.0.0 start-dev

open the browser at http://localhost:8080 and check the network logs during login.

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions