You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "frank.edward" <na...@gmail.com> on 2012/11/12 05:40:04 UTC

How to set the dynamic key information in camel PGP encryption/decryption

Hi All,

I would like to encrypt/decrypt the file in camel route using PGP data
format. How can I set the keyfile,userid and userpassword dynamically in
camel route? For example:

from("direct:inline").process("myprivateprocessorRef").unmarshal().pgp(*key,*userid,*username).to("destination");

* Inside "myprivateprocessorRef", I will set keyfilename, userid and
userpassword into the message header based on certain logic.
* How can I retrieve those header information in
.pgp(*key,*userid,*username) ?



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-set-the-dynamic-key-information-in-camel-PGP-encryption-decryption-tp5722562.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to set the dynamic key information in camel PGP encryption/decryption

Posted by Willem jiang <wi...@gmail.com>.
I think it could more common practice if we put the key information into the message header.
FYI, I just committed a simple patch into the trunk[1]
Normally we don't add new feature into the maintenance branch, but you can back port the patch to the 2.10.3 branch if you need it right now.

[1]http://svn.apache.org/viewvc?rev=1408571&view=rev

-- 
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang 
Weibo: willemjiang





On Monday, November 12, 2012 at 3:07 PM, frank.edward wrote:

> Hi Willem,
> 
> Thanks for your reply. Since I am not able to wait for version 2.11.0, I
> will try to update PGPDataFormat in order to support SimpleExpression for
> the keyfilename, userid and password.
> 
> Thanks.
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-set-the-dynamic-key-information-in-camel-PGP-encryption-decryption-tp5722562p5722564.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).




Re: How to set the dynamic key information in camel PGP encryption/decryption

Posted by "frank.edward" <na...@gmail.com>.
Hi Willem,

Thanks for your reply. Since I am not able to wait for version 2.11.0, I
will try to update PGPDataFormat in order to support SimpleExpression for
the keyfilename, userid and password.

Thanks.



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-set-the-dynamic-key-information-in-camel-PGP-encryption-decryption-tp5722562p5722564.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to set the dynamic key information in camel PGP encryption/decryption

Posted by Willem jiang <wi...@gmail.com>.
Hi,

I'm afraid you can not change the key, userid, and username dynamically with PGP data format.
So I fill a JIRA[1] for it, which will help PGP data format to consume the message headers when it does the marshal and unmarshal work.

[1]https://issues.apache.org/jira/browse/CAMEL-5788 

-- 
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang 
Weibo: willemjiang




On Monday, November 12, 2012 at 12:40 PM, frank.edward wrote:

> Hi All,
> 
> I would like to encrypt/decrypt the file in camel route using PGP data
> format. How can I set the keyfile,userid and userpassword dynamically in
> camel route? For example:
> 
> from("direct:inline").process("myprivateprocessorRef").unmarshal().pgp(*key,*userid,*username).to("destination");
> 
> * Inside "myprivateprocessorRef", I will set keyfilename, userid and
> userpassword into the message header based on certain logic.
> * How can I retrieve those header information in
> .pgp(*key,*userid,*username) ?
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-set-the-dynamic-key-information-in-camel-PGP-encryption-decryption-tp5722562.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).