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.NamespaceAwareEncrypt and decrypt XML payloads using Apache Santuario.
-
-
Constructor Summary
Constructors Constructor Description XMLSecurityDataFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAddKeyValueForEncryptedKey()StringgetDigestAlgorithm()StringgetKeyCipherAlgorithm()org.apache.camel.support.jsse.KeyStoreParametersgetKeyOrTrustStoreParameters()StringgetKeyOrTrustStoreParametersRef()StringgetKeyPassword()StringgetMgfAlgorithm()Map<String,String>getNamespaces()StringgetPassPhrase()byte[]getPassPhraseByte()StringgetRecipientKeyAlias()StringgetSecureTag()StringgetSecureTagContents()StringgetXmlCipherAlgorithm()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.voidsetKeyOrTrustStoreParametersRef(String id)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.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, setDataFormatName
-
Methods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
-
-
-
-
Method Detail
-
getXmlCipherAlgorithm
public String getXmlCipherAlgorithm()
-
setXmlCipherAlgorithm
public void setXmlCipherAlgorithm(String 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
-
getPassPhrase
public String getPassPhrase()
-
setPassPhrase
public void setPassPhrase(String 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"
-
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
public String getSecureTag()
-
setSecureTag
public void setSecureTag(String secureTag)
The XPath reference to the XML Element selected for encryption/decryption. If no tag is specified, the entire payload is encrypted/decrypted.
-
getSecureTagContents
public String getSecureTagContents()
-
setSecureTagContents
public void setSecureTagContents(String 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.
-
setKeyCipherAlgorithm
public void setKeyCipherAlgorithm(String 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
-
getKeyCipherAlgorithm
public String getKeyCipherAlgorithm()
-
setRecipientKeyAlias
public void setRecipientKeyAlias(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.
-
getRecipientKeyAlias
public String getRecipientKeyAlias()
-
setKeyOrTrustStoreParametersRef
public void setKeyOrTrustStoreParametersRef(String id)
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
public String 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
public String getKeyPassword()
-
setKeyPassword
public void setKeyPassword(String keyPassword)
The password to be used for retrieving the private key from the KeyStore. This key is used for asymmetric decryption.
-
getDigestAlgorithm
public String getDigestAlgorithm()
-
setDigestAlgorithm
public void setDigestAlgorithm(String digestAlgorithm)
The digest algorithm to use with the RSA OAEP algorithm. The available choices are:- XMLCipher.SHA1
- XMLCipher.SHA256
- XMLCipher.SHA512
-
getMgfAlgorithm
public String getMgfAlgorithm()
-
setMgfAlgorithm
public void setMgfAlgorithm(String mgfAlgorithm)
The MGF Algorithm to use with the RSA OAEP algorithm. The available choices are:- EncryptionConstants.MGF1_SHA1
- EncryptionConstants.MGF1_SHA256
- EncryptionConstants.MGF1_SHA512
-
getAddKeyValueForEncryptedKey
public String getAddKeyValueForEncryptedKey()
-
setAddKeyValueForEncryptedKey
public void setAddKeyValueForEncryptedKey(String addKeyValueForEncryptedKey)
Whether to add the public key used to encrypt the session key as a KeyValue in the EncryptedKey structure or not.
-
setNamespaces
public void setNamespaces(Map<String,String> nspaces)
- Specified by:
setNamespacesin interfaceorg.apache.camel.spi.NamespaceAware
-
-