- spi.connectionsHttpClient.default.enabled=true
- spi.connectionsHttpClient.default.proxy-mappings=[".*;http://proxy:3128"]
For the first one, I pass --spi-connectionsHttpClient-default-enabled=true to the command kc.sh config (indirectly with --auto-config option from Keycloak.X docker image). For the second one I write the property in /opt/jboss/keycloak/conf/keycloak.properties
I didn't manage to make Keycloak.X use the given proxy server so far. I have no issues when I configure the proxy-mappings in "classic" Keycloak. I also tried to write both properties in the keycloak.properties file, with the same result.
You can find in attachment a minimal docker-compose file that reproduces the environment in which I try to make this configuration work.
In the docker-compose file:
- Keycloak and Keycloak.X are both running v15.0.2 and are configured with an isolated network
- a container runs a squid proxy, waiting for requests on port 3128
- two containers are running socat to allow exposing the two isolated keycloaks on the host
The Keycloak.X server is configured from the docker-compose file.
The proxy-mappings on the "classic" keycloak server has to be configured manualy, or example by executing the following command in the container :
printf 'connect\n/subsystem=keycloak-server/spi=connectionsHttpClient/provider=default:write-attribute(name=properties.proxy-mappings,value=[".*;http://squid:8080"])\nreload\n' | /opt/jboss/keycloak/bin/jboss-cli.sh
Does anyone see a mistake in my proxy-mapping configuration for Keycloak.X ? Or am I going in the wrong direction to setup the outgoing-request proxy for Keycloak.X ?
Cheers,
Nicolas