Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Option

Default

Description

recipientKeyAlias

none

The key alias to be used when retrieving the recipient's public or private key from a KeyStore when performing asymmetric key encryption or decryption

keyCipherAlgorithm

none

The cipher algorithm to be used for encryption/decription of the asymmetric key. The available choices are:

  • XMLCipher.RSA_v1dot5
  • XMLCipher.RSA_OAEP

keyOrTrustStoreParameters

none

Configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore.

keyPassword

none

2.10.2, 2.11 The password to be used for retrieving the private key from the KeyStore. This key is used for asymmetric decryption.

Marshal

In order to encrypt the payload, the marshal processor needs to be applied on the route followed by the secureXML() tag.

...

Code Block
 
    <!--  key store configuration -->
    <camel:keyStoreParameters id="keyStoreParams" resource="./recipient.ks" password="password" />

    <camelContext id="springXmlSecurityDataFormatTestCamelContext" 
                  xmlns="http://camel.apache.org/schema/spring"
                  xmlns:cheese="http://cheese.xmlsecurity.camel.apache.org/">
        <route>    
            <from uri="direct://encrypted"/>
                <unmarshal>
                    <secureXML
                        secureTag="//cheese:cheesesites/italy"
                        secureTagContents="true"
                        xmlCipherAlgorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
                        keyCipherAlgorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
                        recipientKeyAlias="recipient"
                        keyOrTrustStoreParametersId="keyStoreParams"
                        keyPassword="privateKeyPassword" />
                </unmarshal>
                ...

Dependencies

...