Hello,
I have built the architecture shown in the attached image.
Step 1. A client authentication request reaches the keycloak security
proxy docker container
Step 2. Proxy asks the actual keycloak server docker container
Step 3. Keycloak Server asks an external LDAP for user credentials
Step 4. Keycloak server replies OK
Step 5. Keycloak proxy replies OK and passes control to the external
application url.
THE PROBLEM IS that after successful authentication, the url of the host
server (i.e. where the keycloak proxy container and keyclak
authentication container lie) appears on the address bar of the browser
instead of the actual external application url.
For example, if the host machine where the keycloak containers lie is
keycloak.containers.gr, and the external application domain name is
www.external.application.gr, then, after a SUCCESSFUL login to the
keycloak SSO login page, the url in the address bar appears to
behttp://keycloak.containers.gr <
http://keycloak.containers.gr/>instead
ofhttp://www.external.application.gr
<
http://www.external.application.gr/>. This fact destroys all the
relative css, js scripts, etc, attached to the site
www.external.application.gr.
KEYCLOAK SECURITY PROXY CONFIGURATION
{
"target-url": "http://www.external.application.gr",
"bind-address": "0.0.0.0",
"send-access-token": true,
"http-port": "8180",
"https-port": "8443",
"applications": [{
"base-path": "/",
"adapter-config": {
"realm": "internal_applications",
"auth-server-url":
"http://keycloak.containers.gr:8202/auth",
"resource": "test_app",
"ssl-required": "external",
"credentials": {
"secret": "xxxxx-xxx-xxx-xxxx-xxxxxxxxxxx"
}
},
"constraints": [{
"pattern": "/*",
"authenticate": true
}],
"proxy-address-forwarding": true
}]
}
I use a proxy.json for the keycloak security proxy configuration
NOTE: I have tried to change the "bind-address": "0.0.0.0" parameter,
from 0.0.0.0 to the IP of the
www.external.application.gr but with no
luck...
please... any help??
Thank you!!
Dimitris
--
_____________________________
Dimitris Charlaftis
Software Engineer
National Documentation Center
email: dharlaftis(a)ekt.gr
_____________________________