Class XMLSecurityDataFormat.Builder
java.lang.Object
org.apache.camel.model.dataformat.XMLSecurityDataFormat.Builder
- All Implemented Interfaces:
DataFormatBuilder<XMLSecurityDataFormat>
- Enclosing class:
- XMLSecurityDataFormat
public static class XMLSecurityDataFormat.Builder
extends Object
implements DataFormatBuilder<XMLSecurityDataFormat>
Builder
is a specific builder for XMLSecurityDataFormat
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddKeyValueForEncryptedKey
(boolean addKeyValueForEncryptedKey) Whether to add the public key used to encrypt the session key as a KeyValue in the EncryptedKey structure or not.addKeyValueForEncryptedKey
(String addKeyValueForEncryptedKey) Whether to add the public key used to encrypt the session key as a KeyValue in the EncryptedKey structure or not.digestAlgorithm
(String digestAlgorithm) The digest algorithm to use with the RSA OAEP algorithm.end()
Ends the build of the data format.keyCipherAlgorithm
(String keyCipherAlgorithm) The cipher algorithm to be used for encryption/decryption of the asymmetric key.keyOrTrustStoreParameters
(org.apache.camel.support.jsse.KeyStoreParameters keyOrTrustStoreParameters) Configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore.keyOrTrustStoreParametersRef
(String keyOrTrustStoreParametersRef) Refers to a KeyStore instance to lookup in the registry, which is used for configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore.keyPassword
(String keyPassword) The password to be used for retrieving the private key from the KeyStore.mgfAlgorithm
(String mgfAlgorithm) The MGF Algorithm to use with the RSA OAEP algorithm.namespaces
(Map<String, String> namespaces) Injects the XML Namespaces of prefix -> uri mappingspassPhrase
(String passPhrase) A String used as passPhrase to encrypt/decrypt content.passPhraseByte
(byte[] passPhraseByte) A byte[] used as passPhrase to encrypt/decrypt content.recipientKeyAlias
(String recipientKeyAlias) 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.The XPath reference to the XML Element selected for encryption/decryption.secureTagContents
(boolean secureTagContents) A boolean value to specify whether the XML Element is to be encrypted or the contents of the XML Element.secureTagContents
(String secureTagContents) A boolean value to specify whether the XML Element is to be encrypted or the contents of the XML Element.xmlCipherAlgorithm
(String xmlCipherAlgorithm) The cipher algorithm to be used for encryption/decryption of the XML message content.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
xmlCipherAlgorithm
The cipher algorithm to be used for encryption/decryption of the XML message content. The available choices are:- XMLCipher.TRIPLEDES
- XMLCipher.AES_128
- XMLCipher.AES_128_GCM
- XMLCipher.AES_192
- XMLCipher.AES_192_GCM
- XMLCipher.AES_256
- XMLCipher.AES_256_GCM
- XMLCipher.SEED_128
- XMLCipher.CAMELLIA_128
- XMLCipher.CAMELLIA_192
- XMLCipher.CAMELLIA_256
-
passPhrase
A String used as passPhrase to encrypt/decrypt content. The passPhrase has to be provided. The passPhrase needs to be put together in conjunction with the appropriate encryption algorithm. For example using TRIPLEDES the passPhase can be a "Only another 24 Byte key" -
passPhraseByte
A byte[] used as passPhrase to encrypt/decrypt content. The passPhrase has to be provided. The passPhrase needs to be put together in conjunction with the appropriate encryption algorithm. For example using TRIPLEDES the passPhase can be a "Only another 24 Byte key" -
secureTag
The XPath reference to the XML Element selected for encryption/decryption. If no tag is specified, the entire payload is encrypted/decrypted. -
secureTagContents
A boolean value to specify whether the XML Element is to be encrypted or the contents of the XML Element. false = Element Level. true = Element Content Level. -
secureTagContents
A boolean value to specify whether the XML Element is to be encrypted or the contents of the XML Element. false = Element Level. true = Element Content Level. -
keyCipherAlgorithm
The cipher algorithm to be used for encryption/decryption of the asymmetric key. The available choices are:- XMLCipher.RSA_v1dot5
- XMLCipher.RSA_OAEP
- XMLCipher.RSA_OAEP_11
-
recipientKeyAlias
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. -
keyOrTrustStoreParametersRef
public XMLSecurityDataFormat.Builder keyOrTrustStoreParametersRef(String keyOrTrustStoreParametersRef) Refers to a KeyStore instance to lookup in the registry, which is used for configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore. -
keyOrTrustStoreParameters
public XMLSecurityDataFormat.Builder keyOrTrustStoreParameters(org.apache.camel.support.jsse.KeyStoreParameters keyOrTrustStoreParameters) Configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore. -
keyPassword
The password to be used for retrieving the private key from the KeyStore. This key is used for asymmetric decryption. -
digestAlgorithm
The digest algorithm to use with the RSA OAEP algorithm. The available choices are:- XMLCipher.SHA1
- XMLCipher.SHA256
- XMLCipher.SHA512
-
mgfAlgorithm
The MGF Algorithm to use with the RSA OAEP algorithm. The available choices are:- EncryptionConstants.MGF1_SHA1
- EncryptionConstants.MGF1_SHA256
- EncryptionConstants.MGF1_SHA512
-
addKeyValueForEncryptedKey
Whether to add the public key used to encrypt the session key as a KeyValue in the EncryptedKey structure or not. -
addKeyValueForEncryptedKey
Whether to add the public key used to encrypt the session key as a KeyValue in the EncryptedKey structure or not. -
namespaces
Injects the XML Namespaces of prefix -> uri mappings- Parameters:
namespaces
- the XML namespaces with the key of prefixes and the value the URIs
-
end
Description copied from interface:DataFormatBuilder
Ends the build of the data format.- Specified by:
end
in interfaceDataFormatBuilder<XMLSecurityDataFormat>
- Returns:
- the data format fully built.
-