Cryptography - real world use

2014-12-24 Thread James Green
I'm looking at Camel's CryptoDataFormat and am wondering to what extent we might employ it. In our use-case we want multiple Camel-powered JARs to send each other messages via a message broker. Some of message needs to remain private so cryptography needs to be used. Right now we have routes that

Re: Cryptography - real world use

2014-12-24 Thread David Karlsen
Sure! The crypto is agnostic of transport and payload - stick it in between the marshalling and the endpoint - and inbetween endpoint and unmarshalling and you should be fit for fight. Good luck! 2014-12-24 11:17 GMT+01:00 James Green : > > I'm looking at Camel's CryptoDataFormat and am wondering

Re: Cryptography - real world use

2014-12-24 Thread James Green
So something like: from("the.input.queue").unmarshal(cryptoDataFormat).unmarshal(jaxbMapper).process(byBusinessProcessor).marshal(cryptoDataFormat).to("the.output.queue") ? Not entirely convinced I have this mentally modelled yet... On 24 December 2014 at 10:22, David Karlsen wrote: > Sure! Th

Re: Cryptography - real world use

2014-12-24 Thread Claus Ibsen
Scott and Jakubs book has an excellent chapter about security where they cover this https://www.packtpub.com/application-development/apache-camel-developers-cookbook On Wed, Dec 24, 2014 at 11:29 AM, James Green wrote: > So something like: > > from("the.input.queue").unmarshal(cryptoDataFormat).u

Re: Cryptography - real world use

2014-12-24 Thread David Karlsen
Yes - you got it - maybe an jaxbUnmarshaller if your byBusinessProcessor returns an jaxb object. Get that to work first - then you might want to use http://camel.apache.org/binding.html as well (which is really just syntactic sugar to make the dataformat a property of the endpoint/transport. 2014-

Re: Cryptography - real world use

2014-12-24 Thread James Green
Bought this but it's pretty shallow for a real-world example, not seeing much I didn't learn from the web site. Adding encryption/decryption where there already exists marshalling/un-marshalling would have been far more meaningful. On 24 December 2014 at 10:58, Claus Ibsen wrote: > Scott and Jak

Re: Cryptography - real world use

2014-12-24 Thread James Green
OK do we need to wrap the process() with both un-marshal to a POJO beforehand and marshal to XML/JSON afterwards, and wrap this in decrypt/encrypt basically. Not seeing examples showing the chaining together of marshal calls so there's doubts in my mind reading this stuff. On 24 December 2014 at

Re: Cryptography - real world use

2014-12-24 Thread James Green
Incidentally what you expect to see if I have a POJO and sent it to MongoDB via an encrypting marshaller? A document full of binary or a hash where the values are binary? On 24 December 2014 at 11:39, James Green wrote: > OK do we need to wrap the process() with both un-marshal to a POJO > befor