Name | Kind | Type | Required | Deprecated | Default Value | Enum Values | Description |
---|---|---|---|---|---|---|---|
command | path | org.apache.camel.component.xmlsecurity.XmlCommand | true | false | sign verify |
Whether to sign or verify. | |
name | path | java.lang.String | true | false | The name part in the URI can be chosen by the user to distinguish between different signer/verifier endpoints within the camel context. | ||
parentXpath | parameter | javax.xml.crypto.dsig.spec.XPathFilterParameterSpec | false | Sets the XPath to find the parent node in the enveloped case.
Either you specify the parent node via this method or the local name and namespace of the parent
with the methods {@link #setParentLocalName(String)} and {@link #setParentNamespace(String)}.
Default value is If the parameters parentXpath and parentLocalName are specified in the same configuration then an exception is thrown. @param parentXpath xpath to the parent node, if the xpath returns several values then the first Element node is used |
|||
transformMethods | parameter | java.util.List |
false | Transforms which are executed on the message body before the digest is calculated. By default, C14n is added and in the case of enveloped signature (see option parentLocalName) also http://www.w3.org/2000/09/xmldsig#enveloped-signature is added at position 0 of the list. Use methods in XmlSignatureHelper to create the transform methods. | |||
keyAccessor | parameter | org.apache.camel.component.xmlsecurity.api.KeyAccessor | false | For the signing process, a private key is necessary. You specify a key accessor bean which provides this private key. The key accessor bean must implement the KeyAccessor interface. The package org.apache.camel.component.xmlsecurity.api contains the default implementation class DefaultKeyAccessor which reads the private key from a Java keystore. | |||
canonicalizationMethod | parameter | javax.xml.crypto.AlgorithmMethod | false | http://www.w3.org/TR/2001/REC-xml-c14n-20010315 | Canonicalization method used to canonicalize the SignedInfo element before the digest is calculated.
You can use the helper methods XmlSignatureHelper.getCanonicalizationMethod(String algorithm)
or getCanonicalizationMethod(String algorithm, List |
||
signatureAlgorithm | parameter | java.lang.String | false | http://www.w3.org/2000/09/xmldsig#rsa-sha1 | Signature algorithm. Default value is "http://www.w3.org/2000/09/xmldsig#rsa-sha1". | ||
digestAlgorithm | parameter | java.lang.String | false | Digest algorithm URI. Optional parameter. This digest algorithm is used for calculating the digest of the input message. If this digest algorithm is not specified then the digest algorithm is calculated from the signature algorithm. Example: "http://www.w3.org/2001/04/xmlenc#sha256" | |||
addKeyInfoReference | parameter | java.lang.Boolean | false | true | In order to protect the KeyInfo element from tampering you can add a
reference to the signed info element so that it is protected via the
signature value. The default value is true.
Only relevant when a KeyInfo is returned by {@link KeyAccessor}. and
{@link KeyInfo#getId()} is not |
||
prefixForXmlSignatureNamespace | parameter | java.lang.String | false | ds | Namespace prefix for the XML signature namespace
"http://www.w3.org/2000/09/xmldsig#". Default value is "ds".
If null or an empty value is set then no prefix is used for
the XML signature namespace.
See best practice http://www.w3.org/TR/xmldsig-bestpractices/#signing-xml- without-namespaces @param prefixForXmlSignatureNamespace prefix |
||
contentObjectId | parameter | java.lang.String | false | Sets the content object Id attribute value. By default a UUID is
generated. If you set the null value, then a new UUID will
be generated. Only used in the enveloping case. |
|||
signatureId | parameter | java.lang.String | false | Sets the signature Id. If this parameter is not set (null value) then a unique ID is generated for the signature ID (default). If this parameter is set to "" (empty string) then no Id attribute is created in the signature element. | |||
contentReferenceUri | parameter | java.lang.String | false | Reference URI for the content to be signed. Only used in the enveloped case. If the reference URI contains an ID attribute value, then the resource schema URI ( {@link #setSchemaResourceUri(String)}) must also be set because the schema validator will then find out which attributes are ID attributes. Will be ignored in the enveloping or detached case. | |||
contentReferenceType | parameter | java.lang.String | false | Type of the content reference. The default value is null .
This value can be overwritten by the header
{@link XmlSignatureConstants#HEADER_CONTENT_REFERENCE_TYPE}. |
|||
parentLocalName | parameter | java.lang.String | false | Local name of the parent element to which the XML signature element will
be added. Only relevant for enveloped XML signature. Alternatively you can
also use {@link #setParentXpath(XPathFilterParameterSpec)}.
Default value is
This parameter or the parameter {@link #setParentXpath(XPathFilterParameterSpec)} for enveloped signature and the parameter {@link #setXpathsToIdAttributes(List)} for detached signature must not be set in the same configuration. If the parameters parentXpath and parentLocalName are specified in the same configuration then an exception is thrown. @param parentLocalName local name |
|||
parentNamespace | parameter | java.lang.String | false | Namespace of the parent element to which the XML signature element will be added. | |||
plainText | parameter | java.lang.Boolean | false | false | Indicator whether the message body contains plain text. The default value
is false , indicating that the message body contains XML. The
value can be overwritten by the header
{@link XmlSignatureConstants#HEADER_MESSAGE_IS_PLAIN_TEXT}. |
||
plainTextEncoding | parameter | java.lang.String | false | UTF-8 | Encoding of the plain text. Only relevant if the message body is plain text (see parameter {@link #plainText}. Default value is "UTF-8". | ||
properties | parameter | org.apache.camel.component.xmlsecurity.api.XmlSignatureProperties | false | For adding additional References and Objects to the XML signature which contain additional properties, you can provide a bean which implements the XmlSignatureProperties interface. | |||
baseUri | parameter | java.lang.String | false | You can set a base URI which is used in the URI dereferencing. Relative URIs are then concatenated with the base URI. @see XMLCryptoContext#setBaseURI(String) | |||
cryptoContextProperties | parameter | java.util.Map |
false | Sets the crypto context properties. See
{@link XMLCryptoContext#setProperty(String, Object)}. Possible properties
are defined in {@link XMLSignContext} an {@link XMLValidateContext} (see
Supported Properties).
The following properties are set by default to the value {@link Boolean#TRUE} for the XML validation. If you want to switch these features off you must set the property value to {@link Boolean#FALSE}.
|
|||
disallowDoctypeDecl | parameter | java.lang.Boolean | false | true | Disallows that the incoming XML document contains DTD DOCTYPE declaration. The default value is {@link Boolean#TRUE}. @param disallowDoctypeDecl if set to {@link Boolean#FALSE} then DOCTYPE declaration is allowed, otherwise not | ||
omitXmlDeclaration | parameter | java.lang.Boolean | false | false | Indicator whether the XML declaration in the outgoing message body should
be omitted. Default value is false . Can be overwritten by
the header {@link XmlSignatureConstants#HEADER_OMIT_XML_DECLARATION}. |
||
clearHeaders | parameter | java.lang.Boolean | false | true | Determines if the XML signature specific headers be cleared after signing and verification. Defaults to true. | ||
schemaResourceUri | parameter | java.lang.String | false | Classpath to the XML Schema. Must be specified in the detached XML Signature case for determining the ID attributes, might be set in the enveloped and enveloping case. If set, then the XML document is validated with the specified XML schema. The schema resource URI can be overwritten by the header {@link XmlSignatureConstants#HEADER_SCHEMA_RESOURCE_URI}. | |||
outputXmlEncoding | parameter | java.lang.String | false | The character encoding of the resulting signed XML document. If
null then the encoding of the original XML document is used. |
|||
keySelector | parameter | javax.xml.crypto.KeySelector | false | Provides the key for validating the XML signature. | |||
xmlSignatureChecker | parameter | org.apache.camel.component.xmlsecurity.api.XmlSignatureChecker | false | This interface allows the application to check the XML signature before the validation is executed. This step is recommended in http://www.w3.org/TR/xmldsig-bestpractices/#check-what-is-signed | |||
xmlSignature2Message | parameter | org.apache.camel.component.xmlsecurity.api.XmlSignature2Message | false | Bean which maps the XML signature to the output-message after the validation. How this mapping should be done can be configured by the options outputNodeSearchType, outputNodeSearch, and removeSignatureElements. The default implementation offers three possibilities which are related to the three output node search types "Default", "ElementName", and "XPath". The default implementation determines a node which is then serialized and set to the body of the output message If the search type is "ElementName" then the output node (which must be in this case an element) is determined by the local name and namespace defined in the search value (see option outputNodeSearch). If the search type is "XPath" then the output node is determined by the XPath specified in the search value (in this case the output node can be of type "Element", "TextNode" or "Document"). If the output node search type is "Default" then the following rules apply: In the enveloped XML signature case (there is a reference with URI="" and transform "http://www.w3.org/2000/09/xmldsig#enveloped-signature"), the incoming XML document without the Signature element is set to the output message body. In the non-enveloped XML signature case, the message body is determined from a referenced Object; this is explained in more detail in chapter "Output Node Determination in Enveloping XML Signature Case". | |||
validationFailedHandler | parameter | org.apache.camel.component.xmlsecurity.api.ValidationFailedHandler | false | Handles the different validation failed situations. The default implementation throws specific exceptions for the different situations (All exceptions have the package name org.apache.camel.component.xmlsecurity.api and are a sub-class of XmlSignatureInvalidException. If the signature value validation fails, a XmlSignatureInvalidValueException is thrown. If a reference validation fails, a XmlSignatureInvalidContentHashException is thrown. For more detailed information, see the JavaDoc. | |||
outputNodeSearch | parameter | java.lang.Object | false | Sets the output node search value for determining the node from the XML signature document which shall be set to the output message body. The class of the value depends on the type of the output node search. The output node search is forwarded to {@link XmlSignature2Message}. | |||
outputNodeSearchType | parameter | java.lang.String | false | Default | Determines the search type for determining the output node which is serialized into the output message bodyF. See {@link #setOutputNodeSearch(Object)}. The supported default search types you can find in {@link DefaultXmlSignature2Message}. | ||
removeSignatureElements | parameter | java.lang.Boolean | false | false | Indicator whether the XML signature elements (elements with local name
"Signature" and namesapce ""http://www.w3.org/2000/09/xmldsig#"") shall
be removed from the document set to the output message. Normally, this is
only necessary, if the XML signature is enveloped. The default value is
{@link Boolean#FALSE}. This parameter is forwarded to
{@link XmlSignature2Message}.
This indicator has no effect if the output node search is of type {@link DefaultXmlSignature2Message#OUTPUT_NODE_SEARCH_TYPE_DEFAULT}.F |
||
secureValidation | parameter | java.lang.Boolean | false | true | Enables secure validation. If true then secure validation is enabled. | ||
exchangePattern | parameter | org.apache.camel.ExchangePattern | false | InOnly | InOnly RobustInOnly InOut InOptionalOut OutOnly RobustOutOnly OutIn OutOptionalIn |
Sets the default exchange pattern when creating an exchange | |
synchronous | parameter | boolean | false | false | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). |