You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Rich Newcomb (JIRA)" <ji...@apache.org> on 2011/06/07 06:17:59 UTC

[jira] [Created] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

Add asymmetric encryption support to the XMLSecurity component
--------------------------------------------------------------

                 Key: CAMEL-4061
                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
             Project: Camel
          Issue Type: Improvement
            Reporter: Rich Newcomb


Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.

This enhancement provides the following capabilities:

1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
4. Allows key store and trust store information to be defined in the camel context

Example configuration:
{code}
// context properties for encryption
contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
    	
// context properties for decryption
contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
    
context.addRoutes(new RouteBuilder() {	  
  public void configure() {
    from("direct:start")
     .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
     .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
  }
});
{code}
 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Ashwin Karpe commented on CAMEL-4061:
-------------------------------------

Really nice patch, Rich...

Wish I had done it myself ;)... Keep em coming.

Cheers,

Ashwin...

> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>            Assignee: Hadrian Zbarcea
>             Fix For: 2.8.0
>
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Edstrom Johan commented on CAMEL-4061:
--------------------------------------

Rich, this is really nice!
One comment, in the CXF/SMX codebase you have shell scripts to re-generate keystores as they will expire, that might be a good addition.

> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Hadrian Zbarcea resolved CAMEL-4061.
------------------------------------

    Resolution: Fixed

Fixed.

> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>            Assignee: Hadrian Zbarcea
>             Fix For: 2.8.0
>
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Rich Newcomb updated CAMEL-4061:
--------------------------------

    Attachment: sender.ts
                recipient.ks

camel-xmlsecurity/src/test/resources

> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Hadrian Zbarcea reassigned CAMEL-4061:
--------------------------------------

    Assignee: Hadrian Zbarcea

> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>            Assignee: Hadrian Zbarcea
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Rich Newcomb updated CAMEL-4061:
--------------------------------

    Attachment: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch
                2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch

> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Hadrian Zbarcea commented on CAMEL-4061:
----------------------------------------

I applied the second patch, but there are 5 tests failing which I @Ignore. I will look into it tomorrow to figure out the cause of an InvalidKeyException("Illegal key size or default parameters").

> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>            Assignee: Hadrian Zbarcea
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Hadrian Zbarcea commented on CAMEL-4061:
----------------------------------------

Looks like I forgot to also commit the the fix. Done.

> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>            Assignee: Hadrian Zbarcea
>             Fix For: 2.8.0
>
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Hadrian Zbarcea commented on CAMEL-4061:
----------------------------------------

Rich, thanks for the patch. I applied the camel-core part, I am testing the second one now and will commit shortly. Thanks again, and keep them coming.

> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Rich Newcomb updated CAMEL-4061:
--------------------------------

    Comment: was deleted

(was: camel-xmlsecurity/src/test/resources)

> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Work started] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Work on CAMEL-4061 started by Hadrian Zbarcea.

> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>            Assignee: Hadrian Zbarcea
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Hadrian Zbarcea updated CAMEL-4061:
-----------------------------------

    Fix Version/s: 2.7.3

> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>            Assignee: Hadrian Zbarcea
>             Fix For: 2.7.3, 2.8.0
>
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Rich Newcomb commented on CAMEL-4061:
-------------------------------------

This patch fixes a few other issues. I will create new issues for those to provide searchable pointers.

I will be happy to update the patch as necessary, and could integrate with appropriate elements from CAMEL-3750 on the trunk.  Please provide tasks / direction as useful.

> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Claus Ibsen commented on CAMEL-4061:
------------------------------------

Did the 2nd patch ever get committed? 

> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>            Assignee: Hadrian Zbarcea
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Rich Newcomb edited comment on CAMEL-4061 at 6/14/11 12:51 PM:
---------------------------------------------------------------

Changing all of the AES_256 algorithms to AES_128 should fix that problem.

      was (Author: rnewcomb):
    Changing all of the asymmetric algorithms from AES_256 to AES_128 should fix that problem.
  
> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>            Assignee: Hadrian Zbarcea
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Rich Newcomb commented on CAMEL-4061:
-------------------------------------

Changing all of the asymmetric algorithms from AES_256 to AES_128 should fix that problem.

> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>            Assignee: Hadrian Zbarcea
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Claus Ibsen updated CAMEL-4061:
-------------------------------

    Fix Version/s: 2.8.0

Hadrian can you get this fixed so we are starting to be ready to cut Camel 2.8?

> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>            Assignee: Hadrian Zbarcea
>             Fix For: 2.8.0
>
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4061) Add asymmetric encryption support to the XMLSecurity component

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

Claus Ibsen commented on CAMEL-4061:
------------------------------------

Back in the days when using Java security you could hit issues when key lengths got too big. Well there was some US export restrictions upon the JDK so you had to install an add-on to your JDK/JRE so it could support keys with bigger lengths.

And the JDK wasn't so informative when you had such a situation so it could take a while to figure it out. So anything I see something with security and key length issues then I think about that.


> Add asymmetric encryption support to the XMLSecurity component
> --------------------------------------------------------------
>
>                 Key: CAMEL-4061
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4061
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Rich Newcomb
>            Assignee: Hadrian Zbarcea
>         Attachments: 2011.06.06-CAMEL-4061-camel-core-2.7.x.patch, 2011.06.06-CAMEL-4061-xmlsecurity-2.7.x.patch, recipient.ks, sender.ts
>
>
> Enhance the camel-xmlsecurity data format to support asymmetric key encryption algorithms.
> This enhancement provides the following capabilities:
> 1. Expands the xmlsecurity data format API with a public method that accepts a key transport algorithm and recipient key alias
> 2. Supports the RSA 1.5 and RSA OAEP asymmetric key encryption algorithms
> 3. Alternatively allows the recipient public key alias to be defined within a message exchange or in camel context
> 4. Allows key store and trust store information to be defined in the camel context
> Example configuration:
> {code}
> // context properties for encryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_URL, getClass().getClassLoader().getResource("sender.ts").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_TRUST_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_RECIPIENT_ALIAS, "recipient");
>     	
> // context properties for decryption
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_URL, getClass().getClassLoader().getResource("recipient.ks").toString());
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_PASSWORD, "password");
> contextProps.put(XMLSecurityDataFormat.XML_ENC_KEY_STORE_ALIAS, "recipient");
>     
> context.addRoutes(new RouteBuilder() {	  
>   public void configure() {
>     from("direct:start")
>      .marshal().secureXML("//privatenode", true, "some-pub-key-alias", XMLCipher.AES_256, XMLCipher.RSA_v1dot5).to("mock:encrypted")
>      .unmarshal().secureXML("//privatenode", true, "somet-pub-key-alias",XMLCipher.AES_256,XMLCipher.RSA_v1dot5).to("mock:decrypted")	            
>   }
> });
> {code}
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira