You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mike Rawlins <mc...@mcrawlins.net> on 2010/04/10 00:34:51 UTC

POJO Example with https transport

All,

This is a follow on to my previous note POJO Example with http transport.

After getting HTTP working, I did the following to get HTTPS working:

Per various posts and pages for ActiveMQ, after adding the https
transportConnector (described in my previous note), I set up key and trust
stores:

In conf, deleted existing broker-localhost and client keys in broker.ks,
broker.ts, client.ts, client.ks

Created new keys, signed, and added to key and truststores:

keytool -keystore broker.ks -alias broker-localhost -genkey -keyalg RSA
keytool -keystore broker.ks -alias broker-localhost -selfcert

keytool -keystore client.ks -alias client -genkey -keyalg RSA
keytool -keystore client.ks -alias client -selfcert

keytool -export -keystore broker.ks -alias broker-localhost -file
broker-localhost.cert
keytool -import -keystore client.ts -alias broker-localhost -file
broker-localhost.cert

keytool -export -keystore client.ks -alias client -file client.cert
keytool -import -keystore broker.ts -alias client -file client.cert

I assume that this will make the client and broker trust each other.

Modified common build to add runtime java system properties for client
keystore and truststore:

Edited common_build.xml to add to /project/macrodef[1]/sequential/java,
after <sysproperty key="java.util.logging.config.file"
value="${build.classes.dir}/logging.properties"/>, the following:

<sysproperty key="javax.net.ssl.keyStore"
value="C:\progress\fuse-message-broker-5.3.0.5\conf\client.ks"/>
<sysproperty key="javax.net.ssl.keyStorePassword" value="password"/>
<sysproperty key="javax.net.ssl.trustStore"
value="C:\progress\fuse-message-broker-5.3.0.5\conf\client.ts"/>

Granted, this is a rather contrived example and in a production
implementation we will probably not use self-signed certificates and
certainly will have different key and truststores, but it does at least
demonstrate the basic principles.

Have I left anything out?

Thanks,

Mike






-- 
View this message in context: http://old.nabble.com/POJO-Example-with-https-transport-tp28198359p28198359.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: POJO Example with https transport

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Apr 12, 2010 at 5:06 PM, Mike Rawlins <mc...@mcrawlins.net> wrote:
>
> No, I generally abhor cross-posting and since this and the previous note
> seemed more related to Camel than AMQ, I elected to post here.
>

Well I actually think its the reverse. You post about how to use HTTPS
transport with AMQ.
It has nothing to do with Camel.


> I documented the AMQ side just to be thorough, but don't really have any
> questions about it. If I do I'll post those questions on the AMQ forum.
>
>
> Claus Ibsen-2 wrote:
>>
>> Hi
>>
>> Have you asked at the AMQ forum as your questions is related to Apache
>> ActiveMQ?
>>
>>
>
> --
> View this message in context: http://old.nabble.com/POJO-Example-with-https-transport-tp28198359p28219035.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: POJO Example with https transport

Posted by Mike Rawlins <mc...@mcrawlins.net>.
No, I generally abhor cross-posting and since this and the previous note
seemed more related to Camel than AMQ, I elected to post here.

I documented the AMQ side just to be thorough, but don't really have any
questions about it. If I do I'll post those questions on the AMQ forum.


Claus Ibsen-2 wrote:
> 
> Hi
> 
> Have you asked at the AMQ forum as your questions is related to Apache
> ActiveMQ?
> 
> 

-- 
View this message in context: http://old.nabble.com/POJO-Example-with-https-transport-tp28198359p28219035.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: POJO Example with https transport

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Have you asked at the AMQ forum as your questions is related to Apache ActiveMQ?


On Sat, Apr 10, 2010 at 12:34 AM, Mike Rawlins <mc...@mcrawlins.net> wrote:
>
> All,
>
> This is a follow on to my previous note POJO Example with http transport.
>
> After getting HTTP working, I did the following to get HTTPS working:
>
> Per various posts and pages for ActiveMQ, after adding the https
> transportConnector (described in my previous note), I set up key and trust
> stores:
>
> In conf, deleted existing broker-localhost and client keys in broker.ks,
> broker.ts, client.ts, client.ks
>
> Created new keys, signed, and added to key and truststores:
>
> keytool -keystore broker.ks -alias broker-localhost -genkey -keyalg RSA
> keytool -keystore broker.ks -alias broker-localhost -selfcert
>
> keytool -keystore client.ks -alias client -genkey -keyalg RSA
> keytool -keystore client.ks -alias client -selfcert
>
> keytool -export -keystore broker.ks -alias broker-localhost -file
> broker-localhost.cert
> keytool -import -keystore client.ts -alias broker-localhost -file
> broker-localhost.cert
>
> keytool -export -keystore client.ks -alias client -file client.cert
> keytool -import -keystore broker.ts -alias client -file client.cert
>
> I assume that this will make the client and broker trust each other.
>
> Modified common build to add runtime java system properties for client
> keystore and truststore:
>
> Edited common_build.xml to add to /project/macrodef[1]/sequential/java,
> after <sysproperty key="java.util.logging.config.file"
> value="${build.classes.dir}/logging.properties"/>, the following:
>
> <sysproperty key="javax.net.ssl.keyStore"
> value="C:\progress\fuse-message-broker-5.3.0.5\conf\client.ks"/>
> <sysproperty key="javax.net.ssl.keyStorePassword" value="password"/>
> <sysproperty key="javax.net.ssl.trustStore"
> value="C:\progress\fuse-message-broker-5.3.0.5\conf\client.ts"/>
>
> Granted, this is a rather contrived example and in a production
> implementation we will probably not use self-signed certificates and
> certainly will have different key and truststores, but it does at least
> demonstrate the basic principles.
>
> Have I left anything out?
>
> Thanks,
>
> Mike
>
>
>
>
>
>
> --
> View this message in context: http://old.nabble.com/POJO-Example-with-https-transport-tp28198359p28198359.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus