Hi,
I’m using Keycloak 22.0.5 and trying to establish an OIDC connection to an external IDP. The server is behind a proxy and already configured with --proxy=edge. I have also set tup HTTP_PROXY and HTTPS_PROXY environment and is able to successfully get the curl results of the external IDP. However, there is an exception when trying with Keycloak as below:
2023-11-03 20:47:27,929 DEBUG [org.keycloak.services.managers.AuthenticationSessionManager] (executor-thread-1) Found AUTH_SESSION_ID cookie with value 8c10f2fc-0b0f-4b97-b30c-99e57c917542.ip-100-112-78-106-30403
2023-11-03 20:47:27,930 DEBUG [org.keycloak.services.resources.IdentityBrokerService] (executor-thread-1) Authorization code is valid.
2023-11-03 20:47:27,939 DEBUG [org.keycloak.connections.httpclient.DefaultHttpClientFactory] (executor-thread-1) Trying to use proxy mapping from env vars
2023-11-03 20:47:27,939 DEBUG [org.keycloak.connections.httpclient.DefaultHttpClientFactory] (executor-thread-1) httpProxy: null, noProxy: null
2023-11-03 20:47:27,941 WARN [org.keycloak.connections.httpclient.DefaultHttpClientFactory] (executor-thread-1) TruststoreProvider is disabled
23-11-03 20:47:28,255 DEBUG [org.apache.http.client.protocol.RequestAuthCache] (executor-thread-1) Auth cache not set in the context
2023-11-03 20:47:28,257 DEBUG [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] (executor-thread-1) Connection request: [route: {s}->https://stg-test.com:443][total available: 0; route allocated: 0 of 64; total allocated: 0 of 128]
2023-11-03 20:47:28,275 DEBUG [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] (executor-thread-1) Connection leased: [id: 0][route: {s}->https://stg-test.com:443][total available: 0; route allocated: 1 of 64; total allocated: 1 of 128]
2023-11-03 20:47:28,277 DEBUG [org.apache.http.impl.execchain.MainClientExec] (executor-thread-1) Opening connection {s}->https://stg-test.com:443
2023-11-03 20:47:28,283 DEBUG [org.apache.http.impl.conn.DefaultHttpClientConnectionOperator] (executor-thread-1) Connecting to stg-test.com/xxx.xxx.xxx.xxx:443
2023-11-03 20:47:28,283 DEBUG [org.apache.http.conn.ssl.SSLConnectionSocketFactory] (executor-thread-1) Connecting socket to stg-test.com/xxx.xxx.xxx.xx:443 with timeout 0
2023-11-03 20:47:28,372 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (Timer-0) new JtaTransactionWrapper
2023-11-03 20:47:28,372 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (Timer-0) was existing? false
2023-11-03 20:47:28,373 DEBUG [org.keycloak.services.scheduled.ScheduledTaskRunner] (Timer-0) Executed scheduled task AbstractLastSessionRefreshStoreFactory$$Lambda$1680/0x00007f688ac806b0
2023-11-03 20:47:28,373 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (Timer-0) JtaTransactionWrapper commit
2023-11-03 20:47:28,373 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (Timer-0) JtaTransactionWrapper end
2023-11-03 20:47:32,915 DEBUG [io.quarkus.resteasy] (vert.x-eventloop-thread-1) IO Exception : io.vertx.core.http.HttpClosedException: Connection was closed
Any advice is appreciated.