Class XMLSecurityDataFormat
java.lang.Object
org.apache.camel.model.IdentifiedType
org.apache.camel.model.DataFormatDefinition
org.apache.camel.model.dataformat.XMLSecurityDataFormat
- All Implemented Interfaces:
org.apache.camel.spi.NamespaceAware
@Metadata(firstVersion="2.0.0",
label="dataformat,transformation,xml",
title="XML Security")
public class XMLSecurityDataFormat
extends DataFormatDefinition
implements org.apache.camel.spi.NamespaceAware
Encrypt and decrypt XML payloads using Apache Santuario.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilderis a specific builder forXMLSecurityDataFormat. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.support.jsse.KeyStoreParametersbyte[]voidsetAddKeyValueForEncryptedKey(String addKeyValueForEncryptedKey) Whether to add the public key used to encrypt the session key as a KeyValue in the EncryptedKey structure or not.voidsetDigestAlgorithm(String digestAlgorithm) The digest algorithm to use with the RSA OAEP algorithm.voidsetKeyCipherAlgorithm(String keyCipherAlgorithm) The cipher algorithm to be used for encryption/decryption of the asymmetric key.voidsetKeyOrTrustStoreParameters(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.voidRefers 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.voidsetKeyPassword(String keyPassword) The password to be used for retrieving the private key from the KeyStore.voidsetMgfAlgorithm(String mgfAlgorithm) The MGF Algorithm to use with the RSA OAEP algorithm.voidsetNamespaces(Map<String, String> nspaces) voidsetPassPhrase(String passPhrase) A String used as passPhrase to encrypt/decrypt content.voidsetPassPhraseByte(byte[] passPhraseByte) A byte[] used as passPhrase to encrypt/decrypt content.voidsetRecipientKeyAlias(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.voidsetSecureTag(String secureTag) The XPath reference to the XML Element selected for encryption/decryption.voidsetSecureTagContents(String secureTagContents) A boolean value to specify whether the XML Element is to be encrypted or the contents of the XML Element.voidsetXmlCipherAlgorithm(String xmlCipherAlgorithm) The cipher algorithm to be used for encryption/decryption of the XML message content.Methods inherited from class org.apache.camel.model.DataFormatDefinition
getDataFormat, getDataFormatName, getShortName, setDataFormat, setDataFormatNameMethods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
-
Constructor Details
-
XMLSecurityDataFormat
public XMLSecurityDataFormat()
-
-
Method Details
-
getXmlCipherAlgorithm
-
setXmlCipherAlgorithm
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
-
getPassPhrase
-
setPassPhrase
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" -
getPassPhraseByte
public byte[] getPassPhraseByte() -
setPassPhraseByte
public void setPassPhraseByte(byte[] 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" -
getSecureTag
-
setSecureTag
The XPath reference to the XML Element selected for encryption/decryption. If no tag is specified, the entire payload is encrypted/decrypted. -
getSecureTagContents
-
setSecureTagContents
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. -
setKeyCipherAlgorithm
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
-
getKeyCipherAlgorithm
-
setRecipientKeyAlias
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. -
getRecipientKeyAlias
-
setKeyOrTrustStoreParametersRef
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. -
getKeyOrTrustStoreParametersRef
-
getKeyOrTrustStoreParameters
public org.apache.camel.support.jsse.KeyStoreParameters getKeyOrTrustStoreParameters() -
setKeyOrTrustStoreParameters
public void setKeyOrTrustStoreParameters(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. -
getKeyPassword
-
setKeyPassword
The password to be used for retrieving the private key from the KeyStore. This key is used for asymmetric decryption. -
getDigestAlgorithm
-
setDigestAlgorithm
The digest algorithm to use with the RSA OAEP algorithm. The available choices are:- XMLCipher.SHA1
- XMLCipher.SHA256
- XMLCipher.SHA512
-
getMgfAlgorithm
-
setMgfAlgorithm
The MGF Algorithm to use with the RSA OAEP algorithm. The available choices are:- EncryptionConstants.MGF1_SHA1
- EncryptionConstants.MGF1_SHA256
- EncryptionConstants.MGF1_SHA512
-
getAddKeyValueForEncryptedKey
-
setAddKeyValueForEncryptedKey
Whether to add the public key used to encrypt the session key as a KeyValue in the EncryptedKey structure or not. -
setNamespaces
- Specified by:
setNamespacesin interfaceorg.apache.camel.spi.NamespaceAware
-
getNamespaces
- Specified by:
getNamespacesin interfaceorg.apache.camel.spi.NamespaceAware
-