Repository navigation
Replies: 1 comment
|
i am too hitting connection reset issues with servlet filter :( |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi, I'm using keycloak servlet filter adapter to integrate my test application with my Keycloak installation.
Keycloak installation is exposed in https with TLS1.2 enabled (as default).
Servlet filter, that is built as an estension of KeycloakOIDCFilter class, try to retrieve wellknown file configuration from url configured in keycloak.json file.
The problem is that the connection to the keycloak server is reset because client try to iniziate connection using TLSv1.
The software is deployed in Websphere Application Server test environment correctly setted to call same wellknown file url without any problem.
When I try to call same url by KeycloakFilterAdapter the Exception is thrown.
I tried to reproduce the problem creating a simple servlet that use Apache HttpClient to call the same url.
In absence of custom configuration the exception is thrown even in this case.
Changing way to create the client from
CloseableHttpClient httpclient = HttpClients.createDefault();
to
CloseableHttpClient httpclient = HttpClientBuilder.create()
.setSSLSocketFactory(SSLConnectionSocketFactory.getSystemSocketFactory())
.build();
the problem is solved.
How can I find a similar solution in keycloak adapter? Can you help me to set TLS1.2 by Keycloak Client Adapter properties or to configure keycloak to use the systemsocketfactory?
I'm attaching server log where you can find ssl conversation and ConnectionReset error.
logs_github.txt
All reactions