[undertow-dev] Reverse proxy with https connections

Stuart Douglas sdouglas at redhat.com
Tue Oct 17 02:38:33 EDT 2017


You need to use one of the connect methods that takes an XnioSsl as a
parameter, and pass in an instance of UndertowXnioSsl. You will
probably want to use the constructor that takes a SSLContext as a
parameter, which you can configure as normal in terms of key and trust
managers.

Stuart

On Mon, Oct 16, 2017 at 11:49 PM, Steve Hu <stevehu at gmail.com> wrote:
> I am extending the ReverseProxyServer example to connect down stream servers
> that listen to https and got the following error on the proxy server. After
> debugging into it, I realized that the ssl is null when UndertowClient tries
> to create connection to the downstream server.
>
> I am wondering who is responsible for creating this ssl object. Where the
> certificates should be loaded?
>
> Thanks,
>
> Steve
>
> proxy_1  | 17:37:12.430 [XNIO-1 I/O-4]   DEBUG io.undertow.request failed -
> Failed to connect
> proxy_1  | java.io.IOException: UT000065: SSL must be specified to connect
> to a https URL
> proxy_1  | at
> io.undertow.client.http.HttpClientProvider.connect(HttpClientProvider.java:94)
> proxy_1  | at
> io.undertow.client.UndertowClient.connect(UndertowClient.java:157)
> proxy_1  | at
> io.undertow.server.handlers.proxy.ProxyConnectionPool.openConnection(ProxyConnectionPool.java:273)
> proxy_1  | at
> io.undertow.server.handlers.proxy.ProxyConnectionPool.connect(ProxyConnectionPool.java:527)
> proxy_1  | at
> io.undertow.server.handlers.proxy.LoadBalancingProxyClient.getConnection(LoadBalancingProxyClient.java:301)
> proxy_1  | at
> io.undertow.server.handlers.proxy.ProxyHandler$ProxyClientHandler.run(ProxyHandler.java:292)
> proxy_1  | at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:582)
> proxy_1  | at org.xnio.nio.WorkerThread.run(WorkerThread.java:466)
>
>
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev


More information about the undertow-dev mailing list