I use Apache Camel 2.17.1 and I have some problems in setting up the SSL client authentication on Jetty component (http://camel.apache.org/jetty.html). The first part with the server SSL runs smoothly (setting up the server keystore and access an HTTPS endpoint from the browser). Now I try to enrich the application by adding another route (with a different http port) where the client certificate is required.
From the documentation, this can be achieved through, since the SSL properties aren't exposed directly by Camel:
<bean id="jetty" class="org.apache.camel.component.jetty.JettyHttpComponent">
<property name="sslSocketConnectors">
<map>
<entry key="8043">
<bean class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
<property name="password"value="..."/>
<property name="keyPassword"value="..."/>
<property name="keystore"value="..."/>
<property name="needClientAuth"value="..."/>
<property name="truststore"value="..."/>
</bean>
</entry>
</map>
</property>
It seams like the documentation was not updated, because these field names doesn't exist anymore in SslContextFactory. I manage to find other candidates, but got the error:
"org.eclipse.jetty.server.ssl.SslSelectChannelConnector" class doesn't exist anymore.
The JettyHttpComponent.setSslSocketConnectors() method accepts Connector interface objects.
Could someone help me in finding a solution based on the newer versions of the Apache Camel (like 2.17)?
SslSelectChannelConnector
is an old class for Jetty 8 and older) – Joakim Erdfelt