-
1. Re: Camel/jetty routing https
michal.warecki Jul 31, 2012 8:05 AM (in response to raulooo_erreauele)You should create ssl context for Jetty. It requires generated keystore.
Example of configuring ssl context in Java:
KeyStoreParameters ksp = new KeyStoreParameters();
ksp.setResource("/users/home/server/keystore.jks");
ksp.setPassword("keystorePassword");
KeyManagersParameters kmp = new KeyManagersParameters();
kmp.setKeyStore(ksp);
kmp.setKeyPassword("keyPassword");
SSLContextParameters scp = new SSLContextParameters();
scp.setKeyManagers(kmp);
JettyComponent jettyComponent = getContext().getComponent("jetty", JettyComponent.class);
jettyComponent.setSslContextParameters(scp);
How can you generate keystore? There is keytool provided by JDK (http://docs.oracle.com/javase/tutorial/security/toolsign/step3.html)
-
2. Re: Camel/jetty routing https
raulooo_erreauele Aug 1, 2012 6:54 PM (in response to michal.warecki)Michal, Thanks for your quick response.
How do I use that jettyComponent object then?
I've been using routes only in a XML fashion, in the spring file.
Here is my route:
<log message="xx body xx $"/>
-
3. Re: Camel/jetty routing https
michal.warecki Aug 2, 2012 2:30 AM (in response to raulooo_erreauele)Example from Camel-Jetty documentation:
...
-
4. Re: Camel/jetty routing https
raulooo_erreauele Aug 2, 2012 7:28 PM (in response to michal.warecki)Thanks again Michal,
Now I'm getting a javax.net.ssl.SSLHandshakeException: no cipher suites in common
But, before I keep trying-and-failing, let me explain my scenario, so I can start from the ground up.
I've a .NET WCF WebService that doesn't require client authentication but it's using https, so I'm able to inquiry the wsdl typing https://wcfserver/servicename?wsdl and I can consume the service without installing a certificate in the client.
Now, my first question is "why would I need to install a certificate in the keystore" when I use a jetty consumer with https in Fuse to do a bridge?"
Appreciate your help in advance,
Thanks!
-
5. Re: Camel/jetty routing https
michal.warecki Aug 3, 2012 5:10 AM (in response to raulooo_erreauele)Yes, but I think there are two connections (first, you are receiving the data; second, you are sending the data).
Try to analize this stackoverflow thread:
http://stackoverflow.com/questions/5706166/apache-camel-http-and-ssl
There is example of working two way ssl proxy with camel.