You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (Created) (JIRA)" <ji...@apache.org> on 2011/11/04 14:47:00 UTC

[jira] [Created] (CAMEL-4618) Add support for PGP data format in Java and XML DSLs

Add support for PGP data format in Java and XML DSLs
----------------------------------------------------

                 Key: CAMEL-4618
                 URL: https://issues.apache.org/jira/browse/CAMEL-4618
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 2.9.0
            Reporter: Claus Ibsen
             Fix For: 2.10


The new PGP data format from CAMEL-4549
requires to create it from Java code.

We should add some syntax sugar and have it in the DSL directly like the other data formats.
We may also want to look into how to configure a public and private key file, and have it load the PGPPublicKey and PGPPrivateKey for you automatic.
Instead of using the PGPDataFormatUtil class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-4618) Add support for PGP data format in Java and XML DSLs

Posted by "Claus Ibsen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-4618.
--------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.10)
                   2.9.0
         Assignee: Claus Ibsen

Adam thanks for the patch.

I use the class resolver from Camel to load the files which ensures we support classpath and file out of the box. Just prefix with file: or classpath: (latter is default) 
                
> Add support for PGP data format in Java and XML DSLs
> ----------------------------------------------------
>
>                 Key: CAMEL-4618
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4618
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.9.0
>
>         Attachments: pgp2-camel-core.patch, pgp2-crypto.patch
>
>
> The new PGP data format from CAMEL-4549
> requires to create it from Java code.
> We should add some syntax sugar and have it in the DSL directly like the other data formats.
> We may also want to look into how to configure a public and private key file, and have it load the PGPPublicKey and PGPPrivateKey for you automatic.
> Instead of using the PGPDataFormatUtil class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4618) Add support for PGP data format in Java and XML DSLs

Posted by "Adam (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam updated CAMEL-4618:
------------------------

    Attachment: pgp-camel-core.patch
                pgpdataformatv2.patch

Patch attached.
                
> Add support for PGP data format in Java and XML DSLs
> ----------------------------------------------------
>
>                 Key: CAMEL-4618
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4618
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Claus Ibsen
>             Fix For: 2.10
>
>         Attachments: pgp-camel-core.patch, pgpdataformatv2.patch
>
>
> The new PGP data format from CAMEL-4549
> requires to create it from Java code.
> We should add some syntax sugar and have it in the DSL directly like the other data formats.
> We may also want to look into how to configure a public and private key file, and have it load the PGPPublicKey and PGPPrivateKey for you automatic.
> Instead of using the PGPDataFormatUtil class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4618) Add support for PGP data format in Java and XML DSLs

Posted by "Adam (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144575#comment-13144575 ] 

Adam commented on CAMEL-4618:
-----------------------------

to ensure we're on the same page,

Are you thinking something like this?

from("").
  marshal().pgp(pubKeyFilename, userid)
  .unmarchal().pgp(priKeyFilename, userid, pwd)
  to("");

For most cases, I would prefer to seteup the pubKeyFilename, priKeyFilename and password only once (instead of each route).  I understand there is a need to override this at the route level.

What is the best practice for doing this in camel?  Maybe check if an object exists in the registry with a specific name such as pgpglobalconfig?  if so use those as defaults?   This would save people repeating the same info on multiple routes or having to set properties.     
                
> Add support for PGP data format in Java and XML DSLs
> ----------------------------------------------------
>
>                 Key: CAMEL-4618
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4618
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Claus Ibsen
>             Fix For: 2.10
>
>
> The new PGP data format from CAMEL-4549
> requires to create it from Java code.
> We should add some syntax sugar and have it in the DSL directly like the other data formats.
> We may also want to look into how to configure a public and private key file, and have it load the PGPPublicKey and PGPPrivateKey for you automatic.
> Instead of using the PGPDataFormatUtil class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4618) Add support for PGP data format in Java and XML DSLs

Posted by "Adam (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam updated CAMEL-4618:
------------------------

    Attachment:     (was: pgp-camel-core.patch)
    
> Add support for PGP data format in Java and XML DSLs
> ----------------------------------------------------
>
>                 Key: CAMEL-4618
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4618
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Claus Ibsen
>             Fix For: 2.10
>
>
> The new PGP data format from CAMEL-4549
> requires to create it from Java code.
> We should add some syntax sugar and have it in the DSL directly like the other data formats.
> We may also want to look into how to configure a public and private key file, and have it load the PGPPublicKey and PGPPrivateKey for you automatic.
> Instead of using the PGPDataFormatUtil class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4618) Add support for PGP data format in Java and XML DSLs

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144641#comment-13144641 ] 

Claus Ibsen commented on CAMEL-4618:
------------------------------------

Adam good start. There is also a UnmarshalDefinition in camel-core.

And I think there is another place in the model in camel-core you may need to add it. For example check where CryptoDataFormat is used in camel-core.

The attributes in the model classes should not use simple types by object types, eg boolean -> Boolean. And they should not have a default value, as we do not want default values to be emitted in XML when marshalling routes to XML. So boolean foo = true. Should just be Boolean foo. And then in the java code you would know that if its == null then its the default value.

Also I think each attribute should have a @XmlAttribute annotation
                
> Add support for PGP data format in Java and XML DSLs
> ----------------------------------------------------
>
>                 Key: CAMEL-4618
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4618
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Claus Ibsen
>             Fix For: 2.10
>
>         Attachments: pgp-camel-core.patch, pgpdataformatv2.patch
>
>
> The new PGP data format from CAMEL-4549
> requires to create it from Java code.
> We should add some syntax sugar and have it in the DSL directly like the other data formats.
> We may also want to look into how to configure a public and private key file, and have it load the PGPPublicKey and PGPPrivateKey for you automatic.
> Instead of using the PGPDataFormatUtil class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4618) Add support for PGP data format in Java and XML DSLs

Posted by "Adam (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam updated CAMEL-4618:
------------------------

    Attachment:     (was: pgpdataformatv2.patch)
    
> Add support for PGP data format in Java and XML DSLs
> ----------------------------------------------------
>
>                 Key: CAMEL-4618
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4618
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Claus Ibsen
>             Fix For: 2.10
>
>
> The new PGP data format from CAMEL-4549
> requires to create it from Java code.
> We should add some syntax sugar and have it in the DSL directly like the other data formats.
> We may also want to look into how to configure a public and private key file, and have it load the PGPPublicKey and PGPPrivateKey for you automatic.
> Instead of using the PGPDataFormatUtil class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4618) Add support for PGP data format in Java and XML DSLs

Posted by "Adam (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam updated CAMEL-4618:
------------------------

    Attachment: pgp2-camel-core.patch
                pgp2-crypto.patch

added xml test cases, and fixed comments noted by Claus.

Also added the xml snippet to the crypto wiki page.
                
> Add support for PGP data format in Java and XML DSLs
> ----------------------------------------------------
>
>                 Key: CAMEL-4618
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4618
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Claus Ibsen
>             Fix For: 2.10
>
>         Attachments: pgp2-camel-core.patch, pgp2-crypto.patch
>
>
> The new PGP data format from CAMEL-4549
> requires to create it from Java code.
> We should add some syntax sugar and have it in the DSL directly like the other data formats.
> We may also want to look into how to configure a public and private key file, and have it load the PGPPublicKey and PGPPrivateKey for you automatic.
> Instead of using the PGPDataFormatUtil class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4618) Add support for PGP data format in Java and XML DSLs

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144642#comment-13144642 ] 

Claus Ibsen commented on CAMEL-4618:
------------------------------------

And for the unit tests in camel-crypto. It would be nice to create *new* unit tests and keep the old ones as they are also perfect valid. 

And you can actually also define <pgp> once, in the <dataFormat> section in the Camel XML file, in the top. So that should allow you to once set username and password.
                
> Add support for PGP data format in Java and XML DSLs
> ----------------------------------------------------
>
>                 Key: CAMEL-4618
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4618
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Claus Ibsen
>             Fix For: 2.10
>
>         Attachments: pgp-camel-core.patch, pgpdataformatv2.patch
>
>
> The new PGP data format from CAMEL-4549
> requires to create it from Java code.
> We should add some syntax sugar and have it in the DSL directly like the other data formats.
> We may also want to look into how to configure a public and private key file, and have it load the PGPPublicKey and PGPPrivateKey for you automatic.
> Instead of using the PGPDataFormatUtil class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira