Content-Security-Policy issue with KC_HOSTNAME_ADMIN option set
See original GitHub issueDescribe the bug
With Keycloak 17.0.0 when trying to access Keycloak admin console through the hostname set in KC_HOSTNAME_ADMIN I hit the following error in the browser console:
Refused to frame 'https://console.idp.test.local/realms/master/protocol/openid-connect/3p-cookies/step1.html' because it violates the following Content Security Policy directive: "frame-src https://idp.test.local".
Keycloak is running inside a container that has the following env vars set:
KC_HOSTNAME: idp.test.local KC_HOSTNAME_ADMIN: console.idp.test.local KC_HOSTNAME_STRICT_BACKCHANNEL: “true”
Keycloak starts with the following hostname log:
2022-02-20 17:53:18,279 INFO [org.keycloak.quarkus.runtime.hostname.DefaultHostnameProvider] (main) Hostname settings: FrontEnd: idp.test.local, Strict HTTPS: false, Path: <request>, Strict BackChannel: true, Admin: console.idp.test.local
Version
17.0.0
Expected behavior
Display the login screen without errors
Actual behavior
Throws an error in the browser console and displays an error popup
How to Reproduce?
No response
Anything else?
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:6 (1 by maintainers)
Top GitHub Comments
Still encountering this on 18.0.1
Is there any resolution?