8000 Redirects to admin endpoint 404s on hostname-admin / request scheme mismatch · Issue #39085 · keycloak/keycloak · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Redirects to admin endpoint 404s on hostname-admin / request scheme mismatch #39085
Closed
@russau

Description

@russau

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

core

Describe the bug

When a https url is configured for hostname-admin and requests are http (e.g. from a edge proxy server terminating TLS) requests to /admin/ return a 404.

This was introduced with #38463. The logic comparing requestUrl and adminUrl should be relaxed.

Version

26.2.0

Regression

  • The issue is a regression

Expected behavior

Redirect to Admin Console is performed when /admin is accessed via the Admin Hostname - a mismatch in schemes http/https should be allowed.

Actual behavior

404 response when request is http, and hostname-admin is https.

How to Reproduce?

I'm seeing the issue with only the hostname configured - maybe this is internally setting admin to hostname + "/admin"?

./bin/kc.sh start-dev \
--
67E3
hostname=https://banana.russdev

Access /admin/ with a host header configured - and on http. Observe a 404.

$ curl -v --header 'Host: banana.russdev'  localhost:8080/admin/
< HTTP/1.1 404 Not Found

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0