Repository navigation
Replies: 8 comments 14 replies
|
First try to disable forcing tls. The Hope that helps. |
|
just a FYI for anyone who has the same problem, I couldn't work it out, I've had to back out of using keycloak as the documentation etc isn't quite good enough to actually do this. The developer experience is great, install it, and go, and it's pretty easy to use. But deploying to a production environment fails on its mission "Add authentication to applications and secure services with minimum effort." as the errors keycloak produces don't help and often there is no documentation explaining what's wrong when you get particular errors, and documentation in general on how to do it seem fragmented / out of date / or lacking. Hopefully this improves. I might have a go at it again at a later date. |
|
Im having the same issue when using edge proxy, seems maybe the initial master realm isn't adding allowed redirects to cater for |
|
This below currently works for me, using 18.0.2 on Ubuntu 22.04: Add --proxy=edge to startup of keycloak in systemd keycloak.service file Below FULL nginx config, default site disabled. |
|
Perhaps I'm misunderstanding the question, but in my case I've gotten Keycloak to listen on a custom URL behind an Apache reverse proxy, and it appears to work. We're still building the environment, so it's not in production, but it has supported my testing. First, I use this option when building keycloak: I have these settings when I start Keycloak: My apache proxy load balances between two Keycloak servers, but when I had only one server configured, it worked fine with this configuration, where my keycloak instance listens on port 8083: |
|
This thread is quire old, I'm wondering if someone figure out how to get work keycloak (HTTP) with IIS (HTTPS) as reverse proxy? As the original request from @keithn |
|
I am using portainer in my synology NAS and using reverse proxy to load apps. I was able to load homepage but not the admin page. I was able to resolve the issue with the following docker-compose script. https://gist.github.com/anup-khanal/3c3d29978dfb5c3f88727b4f4adbba67 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
So I started out using keycloak in start dev, and it was super trouble free... but now trying to work out how to configure it for a production environment, I get all kinds of problems and I'm really not sure how to solve them. I'm using keycloak for a .net website, and I want to put it behind a reverse proxy on IIS where it has a certificate. It has a sql database backend ( which seems to work ok so far). Ultimately the keycloak server would live in a private network and not directly exposed to the internet and I could access the admin interface via the internal private network. I'm just experimenting with this locally using docker, and a windows server 2019 virtual machine for web which has an address of "keyserver.local". I made a certificate on the windows server for the website, and use a browser on that server to try out the reverse proxy to keycloak.
I have a docker compose :
version: "3.2"
services:
keycloak:
image: quay.io/keycloak/keycloak:latest
container_name: keycloak
ports:
- "8090:8080"
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
- KC_DB=mssql
- KC_DB_URL=jdbc:sqlserver://192.168.1.146;database=Keycloak
- KC_DB_USERNAME=keycloak
- KC_DB_PASSWORD=keycloak
- KC_HOSTNAME=keyserver.local
- KC_TRANSACTION_XA_ENABLED=false
command:
- start --auto-build --proxy=edge
so if I try to use the internal network
http://192.168.1.146:8090/admin/master/console/or via the proxy (which ideally won't proxy admin , but it is while I try and work this out)
https://keyserver.local/admin/master/console/I get a login but, logging in I get....
invalid redirect_url
ie, when doing the following it gets a 400 - Bad Request doing a get on the following ....
https://keyserver.local/realms/master/protocol/openid-connect/auth?client_id=security-admin-console&redirect_uri=https://keyserver.local/admin/master/console/&state=81abcd9c-6103-47b0-92e0-180dcf83454d&response_mode=fragment&response_type=code&scope=openid&nonce=04dbc003-15e5-46b0-9680-aaead7e4d008&code_challenge=amiL6XNwyDx5OLB9MMhziKoWkcEWypH_wgZZ3Wfx0wY&code_challenge_method=S256the redirect url for whatever reason always uses the hostname, rather than the direct address, hence why I still have it reverse proxied, but more importantly I don't understand why I'm getting the bad request.
The keycloak DB is fresh, nothing in it and its just using the default admin login.
Not really sure how to get this working / how to work out what is going wrong
All reactions