This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/master by this push: new 85591ef CAMEL-14546: camel-xmlsecurity - Split up into verify and sign endpoints 85591ef is described below commit 85591eff52d8f8ea3236dc52a05ae3cd7deb2fbc Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Thu Feb 13 13:36:43 2020 +0100 CAMEL-14546: camel-xmlsecurity - Split up into verify and sign endpoints --- .../camel/springboot/catalog/components.properties | 3 +- .../catalog/components/xmlsecurity-sign.json | 58 ++++ .../catalog/components/xmlsecurity-verify.json | 48 +++ .../springboot/catalog/components/xmlsecurity.json | 68 ---- components-starter/README.adoc | 9 +- .../XmlSignatureComponentAutoConfiguration.java | 8 +- .../XmlSignatureComponentConfiguration.java | 290 +---------------- ... => XmlVerifierComponentAutoConfiguration.java} | 31 +- .../XmlVerifierComponentConfiguration.java | 355 +++++++++++++++++++++ .../src/main/resources/META-INF/spring.factories | 4 +- docs/modules/ROOT/pages/list.adoc | 9 +- 11 files changed, 501 insertions(+), 382 deletions(-) diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties index ee8361a..287b135 100644 --- a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties +++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties @@ -324,7 +324,8 @@ wordpress workday xchange xj -xmlsecurity +xmlsecurity-sign +xmlsecurity-verify xmpp xquery xslt diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/xmlsecurity-sign.json b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/xmlsecurity-sign.json new file mode 100644 index 0000000..c811833 --- /dev/null +++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/xmlsecurity-sign.json @@ -0,0 +1,58 @@ +{ + "component": { + "kind": "component", + "scheme": "xmlsecurity-sign", + "extendsScheme": "", + "syntax": "xmlsecurity-sign:name", + "title": "XML Security Sign", + "description": "Used to sign exchanges using the XML signature specification.", + "label": "security,transformation", + "deprecated": false, + "async": false, + "consumerOnly": false, + "producerOnly": true, + "lenientProperties": false, + "javaType": "org.apache.camel.component.xmlsecurity.XmlSignatureComponent", + "firstVersion": "2.12.0", + "groupId": "org.apache.camel.springboot", + "artifactId": "camel-xmlsecurity-starter", + "version": "3.1.0-SNAPSHOT" + }, + "componentProperties": { + "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the r [...] + "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }, + "signerConfiguration": { "kind": "property", "displayName": "Signer Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "deprecated": false, "secret": false, "description": "To use a shared XmlSignerConfiguration configuration to use as base for configuring endpoints." } + }, + "properties": { + "name": { "kind": "path", "displayName": "Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "description": "The name part in the URI can be chosen by the user to distinguish between different signer endpoints within the camel context." }, + "addKeyInfoReference": { "kind": "parameter", "displayName": "Add Key Info Reference", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "In order to protect the KeyInfo element from tampering you can add a reference to [...] + "baseUri": { "kind": "parameter", "displayName": "Base Uri", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "You can set a base URI which is used in the URI dereferencing. Relative URIs are then concatenated with the base URI." }, + "canonicalizationMethod": { "kind": "parameter", "displayName": "Canonicalization Method", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "javax.xml.crypto.AlgorithmMethod", "deprecated": false, "secret": false, "defaultValue": "http:\/\/www.w3.org\/TR\/2001\/REC-xml-c14n-20010315", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Canonicalization [...] + "clearHeaders": { "kind": "parameter", "displayName": "Clear Headers", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Determines if the XML signature specific headers be cleared after signing and verification. De [...] + "contentObjectId": { "kind": "parameter", "displayName": "Content Object Id", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Sets the content object Id attribute value. By default a UUID is generated. If you set the null value, then a new UUI [...] + "contentReferenceType": { "kind": "parameter", "displayName": "Content Reference Type", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Type of the content reference. The default value is null. This value can be overwritten by the header XmlSi [...] + "contentReferenceUri": { "kind": "parameter", "displayName": "Content Reference Uri", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Reference URI for the content to be signed. Only used in the enveloped case. If the reference URI contains an [...] + "cryptoContextProperties": { "kind": "parameter", "displayName": "Crypto Context Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Sets the crypto context properties. See {link XMLCryptoContext#s [...] + "digestAlgorithm": { "kind": "parameter", "displayName": "Digest Algorithm", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Digest algorithm URI. Optional parameter. This digest algorithm is used for calculating the digest of the input messag [...] + "disallowDoctypeDecl": { "kind": "parameter", "displayName": "Disallow Doctype Decl", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Disallows that the incoming XML document contains DTD DOCTYPE declaration. The [...] + "keyAccessor": { "kind": "parameter", "displayName": "Key Accessor", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.xmlsecurity.api.KeyAccessor", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "For the signing process, a private key is necessary. You specify a key accessor bean whi [...] + "omitXmlDeclaration": { "kind": "parameter", "displayName": "Omit Xml Declaration", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Indicator whether the XML declaration in the outgoing message body should be omi [...] + "outputXmlEncoding": { "kind": "parameter", "displayName": "Output Xml Encoding", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "The character encoding of the resulting signed XML document. If null then the encoding of the original XML do [...] + "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the [...] + "parentLocalName": { "kind": "parameter", "displayName": "Parent Local Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Local name of the parent element to which the XML signature element will be added. Only relevant for enveloped XML si [...] + "parentNamespace": { "kind": "parameter", "displayName": "Parent Namespace", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Namespace of the parent element to which the XML signature element will be added." }, + "parentXpath": { "kind": "parameter", "displayName": "Parent Xpath", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "javax.xml.crypto.dsig.spec.XPathFilterParameterSpec", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Sets the XPath to find the parent node in the enveloped case. Either you specify the parent [...] + "plainText": { "kind": "parameter", "displayName": "Plain Text", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Indicator whether the message body contains plain text. The default value is false, indicating that the [...] + "plainTextEncoding": { "kind": "parameter", "displayName": "Plain Text Encoding", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "UTF-8", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Encoding of the plain text. Only relevant if the message body is plain text (see paramet [...] + "prefixForXmlSignatureNamespace": { "kind": "parameter", "displayName": "Prefix For Xml Signature Namespace", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "ds", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Namespace prefix for the XML signature namespace http:\/\/www.w [...] + "properties": { "kind": "parameter", "displayName": "Properties", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.xmlsecurity.api.XmlSignatureProperties", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "For adding additional References and Objects to the XML signature which contain [...] + "schemaResourceUri": { "kind": "parameter", "displayName": "Schema Resource Uri", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Classpath to the XML Schema. Must be specified in the detached XML Signature case for determining the ID attr [...] + "signatureAlgorithm": { "kind": "parameter", "displayName": "Signature Algorithm", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "http:\/\/www.w3.org\/2001\/04\/xmldsig-more#rsa-sha256", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Signature algorithm. Default value is [...] + "signatureId": { "kind": "parameter", "displayName": "Signature Id", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Sets the signature Id. If this parameter is not set (null value) then a unique ID is generated for the signature ID (default). [...] + "transformMethods": { "kind": "parameter", "displayName": "Transform Methods", "group": "producer", "label": "", "required": false, "type": "array", "javaType": "java.util.List<javax.xml.crypto.AlgorithmMethod>", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Transforms which are executed on the message body before the digest is calculated. By [...] + "xpathsToIdAttributes": { "kind": "parameter", "displayName": "Xpaths To Id Attributes", "group": "producer", "label": "", "required": false, "type": "array", "javaType": "java.util.List<javax.xml.crypto.dsig.spec.XPathFilterParameterSpec>", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "Define the elements which are signed in the detached cas [...] + "basicPropertyBinding": { "kind": "parameter", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }, + "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." }, + "uriDereferencer": { "kind": "parameter", "displayName": "Uri Dereferencer", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "javax.xml.crypto.URIDereferencer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "configuration", "description": "If you want to restrict the remote access via reference URIs, you can set an own dereferencer. [...] + } +} diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/xmlsecurity-verify.json b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/xmlsecurity-verify.json new file mode 100644 index 0000000..a2ba882 --- /dev/null +++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/xmlsecurity-verify.json @@ -0,0 +1,48 @@ +{ + "component": { + "kind": "component", + "scheme": "xmlsecurity-verify", + "extendsScheme": "", + "syntax": "xmlsecurity-verify:name", + "title": "XML Security Verify", + "description": "Used to verify exchanges using the XML signature specification.", + "label": "security,transformation", + "deprecated": false, + "async": false, + "consumerOnly": false, + "producerOnly": true, + "lenientProperties": false, + "javaType": "org.apache.camel.component.xmlsecurity.XmlVerifierComponent", + "firstVersion": "2.12.0", + "groupId": "org.apache.camel.springboot", + "artifactId": "camel-xmlsecurity-starter", + "version": "3.1.0-SNAPSHOT" + }, + "componentProperties": { + "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the r [...] + "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }, + "verifierConfiguration": { "kind": "property", "displayName": "Verifier Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "deprecated": false, "secret": false, "description": "To use a shared XmlVerifierConfiguration configuration to use as base for configuring endpoints." } + }, + "properties": { + "name": { "kind": "path", "displayName": "Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "description": "The name part in the URI can be chosen by the user to distinguish between different verify endpoints within the camel context." }, + "baseUri": { "kind": "parameter", "displayName": "Base Uri", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "configuration", "description": "You can set a base URI which is used in the URI dereferencing. Relative URIs are then concatenated with the base URI." }, + "clearHeaders": { "kind": "parameter", "displayName": "Clear Headers", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "configuration", "description": "Determines if the XML signature specific headers be cleared after signing and verification. [...] + "cryptoContextProperties": { "kind": "parameter", "displayName": "Crypto Context Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "configuration", "description": "Sets the crypto context properties. See {link XMLCryptoContext [...] + "disallowDoctypeDecl": { "kind": "parameter", "displayName": "Disallow Doctype Decl", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "configuration", "description": "Disallows that the incoming XML document contains DTD DOCTYPE declaration. Th [...] + "keySelector": { "kind": "parameter", "displayName": "Key Selector", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "javax.xml.crypto.KeySelector", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "configuration", "description": "Provides the key for validating the XML signature." }, + "omitXmlDeclaration": { "kind": "parameter", "displayName": "Omit Xml Declaration", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "configuration", "description": "Indicator whether the XML declaration in the outgoing message body should be o [...] + "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the [...] + "outputNodeSearch": { "kind": "parameter", "displayName": "Output Node Search", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "configuration", "description": "Sets the output node search value for determining the node from the XML signature document which shall be set to [...] + "outputNodeSearchType": { "kind": "parameter", "displayName": "Output Node Search Type", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "Default", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "configuration", "description": "Determines the search type for determining the output node which is serialize [...] + "outputXmlEncoding": { "kind": "parameter", "displayName": "Output Xml Encoding", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "configuration", "description": "The character encoding of the resulting signed XML document. If null then the encoding of the original XML [...] + "removeSignatureElements": { "kind": "parameter", "displayName": "Remove Signature Elements", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "configuration", "description": "Indicator whether the XML signature elements (elements with local name S [...] + "schemaResourceUri": { "kind": "parameter", "displayName": "Schema Resource Uri", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "configuration", "description": "Classpath to the XML Schema. Must be specified in the detached XML Signature case for determining the ID at [...] + "secureValidation": { "kind": "parameter", "displayName": "Secure Validation", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "configuration", "description": "Enables secure validation. If true then secure validation is enabled." }, + "validationFailedHandler": { "kind": "parameter", "displayName": "Validation Failed Handler", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.xmlsecurity.api.ValidationFailedHandler", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "configuration", "description": "Handles the different validation failed situation [...] + "xmlSignature2Message": { "kind": "parameter", "displayName": "Xml Signature2 Message", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.xmlsecurity.api.XmlSignature2Message", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "configuration", "description": "Bean which maps the XML signature to the output-message af [...] + "xmlSignatureChecker": { "kind": "parameter", "displayName": "Xml Signature Checker", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.xmlsecurity.api.XmlSignatureChecker", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "configuration", "description": "This interface allows the application to check the XML signat [...] + "basicPropertyBinding": { "kind": "parameter", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }, + "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." }, + "uriDereferencer": { "kind": "parameter", "displayName": "Uri Dereferencer", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "javax.xml.crypto.URIDereferencer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "configuration", "description": "If you want to restrict the remote access via reference URIs, you can set an own dereference [...] + } +} diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/xmlsecurity.json b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/xmlsecurity.json deleted file mode 100644 index 3ffb2c1..0000000 --- a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/xmlsecurity.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "component": { - "kind": "component", - "scheme": "xmlsecurity", - "extendsScheme": "", - "syntax": "xmlsecurity:command:name", - "title": "XML Security", - "description": "Used to sign and verify exchanges using the XML signature specification.", - "label": "security,transformation", - "deprecated": false, - "async": false, - "consumerOnly": false, - "producerOnly": true, - "lenientProperties": false, - "javaType": "org.apache.camel.component.xmlsecurity.XmlSignatureComponent", - "firstVersion": "2.12.0", - "groupId": "org.apache.camel.springboot", - "artifactId": "camel-xmlsecurity-starter", - "version": "3.1.0-SNAPSHOT" - }, - "componentProperties": { - "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the r [...] - "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }, - "signerConfiguration": { "kind": "property", "displayName": "Signer Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "deprecated": false, "secret": false, "description": "To use a shared XmlSignerConfiguration configuration to use as base for configuring endpoints." }, - "verifierConfiguration": { "kind": "property", "displayName": "Verifier Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "deprecated": false, "secret": false, "description": "To use a shared XmlVerifierConfiguration configuration to use as base for configuring endpoints." } - }, - "properties": { - "command": { "kind": "path", "displayName": "Command", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.xmlsecurity.XmlCommand", "enum": [ "sign", "verify" ], "deprecated": false, "deprecationNote": "", "secret": false, "description": "Whether to sign or verify." }, - "name": { "kind": "path", "displayName": "Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "description": "The name part in the URI can be chosen by the user to distinguish between different signer\/verifier endpoints within the camel context." }, - "baseUri": { "kind": "parameter", "displayName": "Base Uri", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "You can set a base URI which is used in the URI dereferencing. Relative URIs are then concatenated with the base URI." }, - "clearHeaders": { "kind": "parameter", "displayName": "Clear Headers", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Determines if the XML signature specific headers be cleared after signing and verificati [...] - "cryptoContextProperties": { "kind": "parameter", "displayName": "Crypto Context Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Sets the crypto context properties. See {link XMLCryptoCon [...] - "disallowDoctypeDecl": { "kind": "parameter", "displayName": "Disallow Doctype Decl", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Disallows that the incoming XML document contains DTD DOCTYPE declaration [...] - "omitXmlDeclaration": { "kind": "parameter", "displayName": "Omit Xml Declaration", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Indicator whether the XML declaration in the outgoing message body should [...] - "outputXmlEncoding": { "kind": "parameter", "displayName": "Output Xml Encoding", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "The character encoding of the resulting signed XML document. If null then the encoding of the original [...] - "schemaResourceUri": { "kind": "parameter", "displayName": "Schema Resource Uri", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Classpath to the XML Schema. Must be specified in the detached XML Signature case for determining the I [...] - "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the [...] - "basicPropertyBinding": { "kind": "parameter", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }, - "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." }, - "uriDereferencer": { "kind": "parameter", "displayName": "Uri Dereferencer", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "javax.xml.crypto.URIDereferencer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "If you want to restrict the remote access via reference URIs, you can set an own derefer [...] - "addKeyInfoReference": { "kind": "parameter", "displayName": "Add Key Info Reference", "group": "sign", "label": "sign", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "In order to protect the KeyInfo element from tampering you can add a referen [...] - "canonicalizationMethod": { "kind": "parameter", "displayName": "Canonicalization Method", "group": "sign", "label": "sign", "required": false, "type": "object", "javaType": "javax.xml.crypto.AlgorithmMethod", "deprecated": false, "secret": false, "defaultValue": "http:\/\/www.w3.org\/TR\/2001\/REC-xml-c14n-20010315", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Canonicali [...] - "contentObjectId": { "kind": "parameter", "displayName": "Content Object Id", "group": "sign", "label": "sign", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Sets the content object Id attribute value. By default a UUID is generated. If you set the null value, then a n [...] - "contentReferenceType": { "kind": "parameter", "displayName": "Content Reference Type", "group": "sign", "label": "sign", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Type of the content reference. The default value is null. This value can be overwritten by the header [...] - "contentReferenceUri": { "kind": "parameter", "displayName": "Content Reference Uri", "group": "sign", "label": "sign", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Reference URI for the content to be signed. Only used in the enveloped case. If the reference URI conta [...] - "digestAlgorithm": { "kind": "parameter", "displayName": "Digest Algorithm", "group": "sign", "label": "sign", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Digest algorithm URI. Optional parameter. This digest algorithm is used for calculating the digest of the input [...] - "keyAccessor": { "kind": "parameter", "displayName": "Key Accessor", "group": "sign", "label": "sign", "required": false, "type": "object", "javaType": "org.apache.camel.component.xmlsecurity.api.KeyAccessor", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "For the signing process, a private key is necessary. You specify a key accessor be [...] - "parentLocalName": { "kind": "parameter", "displayName": "Parent Local Name", "group": "sign", "label": "sign", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Local name of the parent element to which the XML signature element will be added. Only relevant for enveloped [...] - "parentNamespace": { "kind": "parameter", "displayName": "Parent Namespace", "group": "sign", "label": "sign", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Namespace of the parent element to which the XML signature element will be added." }, - "parentXpath": { "kind": "parameter", "displayName": "Parent Xpath", "group": "sign", "label": "sign", "required": false, "type": "object", "javaType": "javax.xml.crypto.dsig.spec.XPathFilterParameterSpec", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Sets the XPath to find the parent node in the enveloped case. Either you specify the [...] - "plainText": { "kind": "parameter", "displayName": "Plain Text", "group": "sign", "label": "sign", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Indicator whether the message body contains plain text. The default value is false, indicating th [...] - "plainTextEncoding": { "kind": "parameter", "displayName": "Plain Text Encoding", "group": "sign", "label": "sign", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "UTF-8", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Encoding of the plain text. Only relevant if the message body is plain text (see p [...] - "prefixForXmlSignatureNamespace": { "kind": "parameter", "displayName": "Prefix For Xml Signature Namespace", "group": "sign", "label": "sign", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "ds", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Namespace prefix for the XML signature namespace http:\/\ [...] - "properties": { "kind": "parameter", "displayName": "Properties", "group": "sign", "label": "sign", "required": false, "type": "object", "javaType": "org.apache.camel.component.xmlsecurity.api.XmlSignatureProperties", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "For adding additional References and Objects to the XML signature which co [...] - "signatureAlgorithm": { "kind": "parameter", "displayName": "Signature Algorithm", "group": "sign", "label": "sign", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "http:\/\/www.w3.org\/2001\/04\/xmldsig-more#rsa-sha256", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Signature algorithm. Default val [...] - "signatureId": { "kind": "parameter", "displayName": "Signature Id", "group": "sign", "label": "sign", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Sets the signature Id. If this parameter is not set (null value) then a unique ID is generated for the signature ID (def [...] - "transformMethods": { "kind": "parameter", "displayName": "Transform Methods", "group": "sign", "label": "sign", "required": false, "type": "array", "javaType": "java.util.List<javax.xml.crypto.AlgorithmMethod>", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Transforms which are executed on the message body before the digest is calculat [...] - "xpathsToIdAttributes": { "kind": "parameter", "displayName": "Xpaths To Id Attributes", "group": "sign", "label": "sign", "required": false, "type": "array", "javaType": "java.util.List<javax.xml.crypto.dsig.spec.XPathFilterParameterSpec>", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration", "configurationField": "signerConfiguration", "description": "Define the elements which are signed in the detach [...] - "keySelector": { "kind": "parameter", "displayName": "Key Selector", "group": "verify", "label": "verify", "required": false, "type": "object", "javaType": "javax.xml.crypto.KeySelector", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "verifierConfiguration", "description": "Provides the key for validating the XML signature." }, - "outputNodeSearch": { "kind": "parameter", "displayName": "Output Node Search", "group": "verify", "label": "verify", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "verifierConfiguration", "description": "Sets the output node search value for determining the node from the XML signature document which shal [...] - "outputNodeSearchType": { "kind": "parameter", "displayName": "Output Node Search Type", "group": "verify", "label": "verify", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "Default", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "verifierConfiguration", "description": "Determines the search type for determining the output node which [...] - "removeSignatureElements": { "kind": "parameter", "displayName": "Remove Signature Elements", "group": "verify", "label": "verify", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "verifierConfiguration", "description": "Indicator whether the XML signature elements (elements with [...] - "secureValidation": { "kind": "parameter", "displayName": "Secure Validation", "group": "verify", "label": "verify", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "verifierConfiguration", "description": "Enables secure validation. If true then secure validation is enabled." }, - "validationFailedHandler": { "kind": "parameter", "displayName": "Validation Failed Handler", "group": "verify", "label": "verify", "required": false, "type": "object", "javaType": "org.apache.camel.component.xmlsecurity.api.ValidationFailedHandler", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "verifierConfiguration", "description": "Handles the different validation fail [...] - "xmlSignature2Message": { "kind": "parameter", "displayName": "Xml Signature2 Message", "group": "verify", "label": "verify", "required": false, "type": "object", "javaType": "org.apache.camel.component.xmlsecurity.api.XmlSignature2Message", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "verifierConfiguration", "description": "Bean which maps the XML signature to the outpu [...] - "xmlSignatureChecker": { "kind": "parameter", "displayName": "Xml Signature Checker", "group": "verify", "label": "verify", "required": false, "type": "object", "javaType": "org.apache.camel.component.xmlsecurity.api.XmlSignatureChecker", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration", "configurationField": "verifierConfiguration", "description": "This interface allows the application to check th [...] - } -} diff --git a/components-starter/README.adoc b/components-starter/README.adoc index 6b9f67d..dcc2591 100644 --- a/components-starter/README.adoc +++ b/components-starter/README.adoc @@ -5,7 +5,7 @@ Apache Camel Spring Boot supports the following Camel artifacts as Spring Boot S == Camel Components // components: START -Number of Camel components: 319 in 254 JAR artifacts (1 deprecated) +Number of Camel components: 320 in 254 JAR artifacts (1 deprecated) [width="100%",cols="4,1,5",options="header"] |=== @@ -941,8 +941,11 @@ Number of Camel components: 319 in 254 JAR artifacts (1 deprecated) | link:https://camel.apache.org/components/latest/xj-component.html[XJ] (camel-xj-starter) + `xj:resourceUri` | 3.0 | Transforms json/xml message back and forth using a XSLT. -| link:https://camel.apache.org/components/latest/xmlsecurity-component.html[XML Security] (camel-xmlsecurity-starter) + -`xmlsecurity:command:name` | 2.12 | Used to sign and verify exchanges using the XML signature specification. +| link:https://camel.apache.org/components/latest/xmlsecurity-sign-component.html[XML Security Sign] (camel-xmlsecurity-starter) + +`xmlsecurity-sign:name` | 2.12 | Used to sign exchanges using the XML signature specification. + +| link:https://camel.apache.org/components/latest/xmlsecurity-verify-component.html[XML Security Verify] (camel-xmlsecurity-starter) + +`xmlsecurity-verify:name` | 2.12 | Used to verify exchanges using the XML signature specification. | link:https://camel.apache.org/components/latest/xmpp-component.html[XMPP] (camel-xmpp-starter) + `xmpp:host:port/participant` | 1.0 | To send and receive messages from a XMPP (chat) server. diff --git a/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java b/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java index dab0bfa..f896e76 100644 --- a/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java +++ b/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java @@ -70,12 +70,12 @@ public class XmlSignatureComponentAutoConfiguration { static class GroupConditions extends GroupCondition { public GroupConditions() { - super("camel.component", "camel.component.xmlsecurity"); + super("camel.component", "camel.component.xmlsecurity-sign"); } } @Lazy - @Bean(name = "xmlsecurity-component") + @Bean(name = "xmlsecurity-sign-component") @ConditionalOnMissingBean(XmlSignatureComponent.class) public XmlSignatureComponent configureXmlSignatureComponent() throws Exception { @@ -111,12 +111,12 @@ public class XmlSignatureComponentAutoConfiguration { ? HierarchicalPropertiesEvaluator.evaluate( applicationContext.getEnvironment(), "camel.component.customizer", - "camel.component.xmlsecurity.customizer", + "camel.component.xmlsecurity-sign.customizer", ((HasId) customizer).getId()) : HierarchicalPropertiesEvaluator.evaluate( applicationContext.getEnvironment(), "camel.component.customizer", - "camel.component.xmlsecurity.customizer"); + "camel.component.xmlsecurity-sign.customizer"); if (useCustomizer) { LOGGER.debug("Configure component {}, with customizer {}", component, customizer); diff --git a/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentConfiguration.java b/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentConfiguration.java index e8ed644..7b348cf 100644 --- a/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentConfiguration.java +++ b/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentConfiguration.java @@ -20,31 +20,27 @@ import java.util.List; import java.util.Map; import javax.annotation.Generated; import javax.xml.crypto.AlgorithmMethod; -import javax.xml.crypto.KeySelector; import javax.xml.crypto.URIDereferencer; import javax.xml.crypto.dsig.spec.XPathFilterParameterSpec; import org.apache.camel.component.xmlsecurity.api.KeyAccessor; -import org.apache.camel.component.xmlsecurity.api.ValidationFailedHandler; -import org.apache.camel.component.xmlsecurity.api.XmlSignature2Message; -import org.apache.camel.component.xmlsecurity.api.XmlSignatureChecker; import org.apache.camel.component.xmlsecurity.api.XmlSignatureProperties; import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon; import org.springframework.boot.context.properties.ConfigurationProperties; /** - * Used to sign and verify exchanges using the XML signature specification. + * Used to sign exchanges using the XML signature specification. * * Generated by camel-package-maven-plugin - do not edit this file! */ @Generated("org.apache.camel.springboot.maven.SpringBootAutoConfigurationMojo") -@ConfigurationProperties(prefix = "camel.component.xmlsecurity") +@ConfigurationProperties(prefix = "camel.component.xmlsecurity-sign") public class XmlSignatureComponentConfiguration extends ComponentConfigurationPropertiesCommon { /** - * Whether to enable auto configuration of the xmlsecurity component. This - * is enabled by default. + * Whether to enable auto configuration of the xmlsecurity-sign component. + * This is enabled by default. */ private Boolean enabled; /** @@ -68,11 +64,6 @@ public class XmlSignatureComponentConfiguration * configuring endpoints. */ private XmlSignerConfigurationNestedConfiguration signerConfiguration; - /** - * To use a shared XmlVerifierConfiguration configuration to use as base for - * configuring endpoints. - */ - private XmlVerifierConfigurationNestedConfiguration verifierConfiguration; public Boolean getLazyStartProducer() { return lazyStartProducer; @@ -99,15 +90,6 @@ public class XmlSignatureComponentConfiguration this.signerConfiguration = signerConfiguration; } - public XmlVerifierConfigurationNestedConfiguration getVerifierConfiguration() { - return verifierConfiguration; - } - - public void setVerifierConfiguration( - XmlVerifierConfigurationNestedConfiguration verifierConfiguration) { - this.verifierConfiguration = verifierConfiguration; - } - public static class XmlSignerConfigurationNestedConfiguration { public static final Class CAMEL_NESTED_CLASS = org.apache.camel.component.xmlsecurity.processor.XmlSignerConfiguration.class; /** @@ -520,268 +502,4 @@ public class XmlSignatureComponentConfiguration this.uriDereferencer = uriDereferencer; } } - - public static class XmlVerifierConfigurationNestedConfiguration { - public static final Class CAMEL_NESTED_CLASS = org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration.class; - /** - * Provides the key for validating the XML signature. - */ - private KeySelector keySelector; - /** - * 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 XmlSignature2Message. - */ - private Object outputNodeSearch; - /** - * Determines the search type for determining the output node which is - * serialized into the output message bodyF. See - * setOutputNodeSearch(Object). The supported default search types you - * can find in DefaultXmlSignature2Message. - */ - private String outputNodeSearchType = "Default"; - /** - * 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 Boolean#FALSE. This parameter is forwarded to - * XmlSignature2Message. This indicator has no effect if the output node - * search is of type - * DefaultXmlSignature2Message#OUTPUT_NODE_SEARCH_TYPE_DEFAULT.F - */ - private Boolean removeSignatureElements = false; - /** - * Enables secure validation. If true then secure validation is enabled. - */ - private Boolean secureValidation = true; - /** - * 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. - */ - private ValidationFailedHandler validationFailedHandler; - /** - * 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. - */ - private XmlSignature2Message xmlSignature2Message; - /** - * 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 - */ - private XmlSignatureChecker xmlSignatureChecker; - /** - * You can set a base URI which is used in the URI dereferencing. - * Relative URIs are then concatenated with the base URI. - */ - private String baseUri; - /** - * Determines if the XML signature specific headers be cleared after - * signing and verification. Defaults to true. - */ - private Boolean clearHeaders = true; - /** - * Sets the crypto context properties. See {link - * XMLCryptoContext#setProperty(String, Object)}. Possible properties - * are defined in XMLSignContext an XMLValidateContext (see Supported - * Properties). The following properties are set by default to the value - * Boolean#TRUE for the XML validation. If you want to switch these - * features off you must set the property value to Boolean#FALSE. - * org.jcp.xml.dsig.validateManifests - * javax.xml.crypto.dsig.cacheReference - */ - private Map cryptoContextProperties; - /** - * Disallows that the incoming XML document contains DTD DOCTYPE - * declaration. The default value is Boolean#TRUE. - */ - private Boolean disallowDoctypeDecl = true; - /** - * Indicator whether the XML declaration in the outgoing message body - * should be omitted. Default value is false. Can be overwritten by the - * header XmlSignatureConstants#HEADER_OMIT_XML_DECLARATION. - */ - private Boolean omitXmlDeclaration = false; - /** - * The character encoding of the resulting signed XML document. If null - * then the encoding of the original XML document is used. - */ - private String outputXmlEncoding; - /** - * 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 - * XmlSignatureConstants#HEADER_SCHEMA_RESOURCE_URI. - */ - private String schemaResourceUri; - /** - * If you want to restrict the remote access via reference URIs, you can - * set an own dereferencer. Optional parameter. If not set the provider - * default dereferencer is used which can resolve URI fragments, HTTP, - * file and XPpointer URIs. Attention: The implementation is provider - * dependent! - */ - private URIDereferencer uriDereferencer; - - public KeySelector getKeySelector() { - return keySelector; - } - - public void setKeySelector(KeySelector keySelector) { - this.keySelector = keySelector; - } - - public Object getOutputNodeSearch() { - return outputNodeSearch; - } - - public void setOutputNodeSearch(Object outputNodeSearch) { - this.outputNodeSearch = outputNodeSearch; - } - - public String getOutputNodeSearchType() { - return outputNodeSearchType; - } - - public void setOutputNodeSearchType(String outputNodeSearchType) { - this.outputNodeSearchType = outputNodeSearchType; - } - - public Boolean getRemoveSignatureElements() { - return removeSignatureElements; - } - - public void setRemoveSignatureElements(Boolean removeSignatureElements) { - this.removeSignatureElements = removeSignatureElements; - } - - public Boolean getSecureValidation() { - return secureValidation; - } - - public void setSecureValidation(Boolean secureValidation) { - this.secureValidation = secureValidation; - } - - public ValidationFailedHandler getValidationFailedHandler() { - return validationFailedHandler; - } - - public void setValidationFailedHandler( - ValidationFailedHandler validationFailedHandler) { - this.validationFailedHandler = validationFailedHandler; - } - - public XmlSignature2Message getXmlSignature2Message() { - return xmlSignature2Message; - } - - public void setXmlSignature2Message( - XmlSignature2Message xmlSignature2Message) { - this.xmlSignature2Message = xmlSignature2Message; - } - - public XmlSignatureChecker getXmlSignatureChecker() { - return xmlSignatureChecker; - } - - public void setXmlSignatureChecker( - XmlSignatureChecker xmlSignatureChecker) { - this.xmlSignatureChecker = xmlSignatureChecker; - } - - public String getBaseUri() { - return baseUri; - } - - public void setBaseUri(String baseUri) { - this.baseUri = baseUri; - } - - public Boolean getClearHeaders() { - return clearHeaders; - } - - public void setClearHeaders(Boolean clearHeaders) { - this.clearHeaders = clearHeaders; - } - - public Map getCryptoContextProperties() { - return cryptoContextProperties; - } - - public void setCryptoContextProperties(Map cryptoContextProperties) { - this.cryptoContextProperties = cryptoContextProperties; - } - - public Boolean getDisallowDoctypeDecl() { - return disallowDoctypeDecl; - } - - public void setDisallowDoctypeDecl(Boolean disallowDoctypeDecl) { - this.disallowDoctypeDecl = disallowDoctypeDecl; - } - - public Boolean getOmitXmlDeclaration() { - return omitXmlDeclaration; - } - - public void setOmitXmlDeclaration(Boolean omitXmlDeclaration) { - this.omitXmlDeclaration = omitXmlDeclaration; - } - - public String getOutputXmlEncoding() { - return outputXmlEncoding; - } - - public void setOutputXmlEncoding(String outputXmlEncoding) { - this.outputXmlEncoding = outputXmlEncoding; - } - - public String getSchemaResourceUri() { - return schemaResourceUri; - } - - public void setSchemaResourceUri(String schemaResourceUri) { - this.schemaResourceUri = schemaResourceUri; - } - - public URIDereferencer getUriDereferencer() { - return uriDereferencer; - } - - public void setUriDereferencer(URIDereferencer uriDereferencer) { - this.uriDereferencer = uriDereferencer; - } - } } \ No newline at end of file diff --git a/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java b/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlVerifierComponentAutoConfiguration.java similarity index 84% copy from components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java copy to components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlVerifierComponentAutoConfiguration.java index dab0bfa..bf38f72 100644 --- a/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlSignatureComponentAutoConfiguration.java +++ b/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlVerifierComponentAutoConfiguration.java @@ -21,7 +21,7 @@ import java.util.List; import java.util.Map; import javax.annotation.Generated; import org.apache.camel.CamelContext; -import org.apache.camel.component.xmlsecurity.XmlSignatureComponent; +import org.apache.camel.component.xmlsecurity.XmlVerifierComponent; import org.apache.camel.spi.ComponentCustomizer; import org.apache.camel.spi.HasId; import org.apache.camel.spring.boot.CamelAutoConfiguration; @@ -51,35 +51,34 @@ import org.springframework.context.annotation.Lazy; @Generated("org.apache.camel.springboot.maven.SpringBootAutoConfigurationMojo") @Configuration(proxyBeanMethods = false) @Conditional({ConditionalOnCamelContextAndAutoConfigurationBeans.class, - XmlSignatureComponentAutoConfiguration.GroupConditions.class}) + XmlVerifierComponentAutoConfiguration.GroupConditions.class}) @AutoConfigureAfter(CamelAutoConfiguration.class) @EnableConfigurationProperties({ComponentConfigurationProperties.class, - XmlSignatureComponentConfiguration.class}) -public class XmlSignatureComponentAutoConfiguration { + XmlVerifierComponentConfiguration.class}) +public class XmlVerifierComponentAutoConfiguration { private static final Logger LOGGER = LoggerFactory - .getLogger(XmlSignatureComponentAutoConfiguration.class); + .getLogger(XmlVerifierComponentAutoConfiguration.class); @Autowired private ApplicationContext applicationContext; @Autowired private CamelContext camelContext; @Autowired - private XmlSignatureComponentConfiguration configuration; + private XmlVerifierComponentConfiguration configuration; @Autowired(required = false) - private List<ComponentCustomizer<XmlSignatureComponent>> customizers; + private List<ComponentCustomizer<XmlVerifierComponent>> customizers; static class GroupConditions extends GroupCondition { public GroupConditions() { - super("camel.component", "camel.component.xmlsecurity"); + super("camel.component", "camel.component.xmlsecurity-verify"); } } @Lazy - @Bean(name = "xmlsecurity-component") - @ConditionalOnMissingBean(XmlSignatureComponent.class) - public XmlSignatureComponent configureXmlSignatureComponent() - throws Exception { - XmlSignatureComponent component = new XmlSignatureComponent(); + @Bean(name = "xmlsecurity-verify-component") + @ConditionalOnMissingBean(XmlVerifierComponent.class) + public XmlVerifierComponent configureXmlVerifierComponent() throws Exception { + XmlVerifierComponent component = new XmlVerifierComponent(); component.setCamelContext(camelContext); Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, @@ -106,17 +105,17 @@ public class XmlSignatureComponentAutoConfiguration { CamelPropertiesHelper.setCamelProperties(camelContext, component, parameters, false); if (ObjectHelper.isNotEmpty(customizers)) { - for (ComponentCustomizer<XmlSignatureComponent> customizer : customizers) { + for (ComponentCustomizer<XmlVerifierComponent> customizer : customizers) { boolean useCustomizer = (customizer instanceof HasId) ? HierarchicalPropertiesEvaluator.evaluate( applicationContext.getEnvironment(), "camel.component.customizer", - "camel.component.xmlsecurity.customizer", + "camel.component.xmlsecurity-verify.customizer", ((HasId) customizer).getId()) : HierarchicalPropertiesEvaluator.evaluate( applicationContext.getEnvironment(), "camel.component.customizer", - "camel.component.xmlsecurity.customizer"); + "camel.component.xmlsecurity-verify.customizer"); if (useCustomizer) { LOGGER.debug("Configure component {}, with customizer {}", component, customizer); diff --git a/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlVerifierComponentConfiguration.java b/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlVerifierComponentConfiguration.java new file mode 100644 index 0000000..abaeb70 --- /dev/null +++ b/components-starter/camel-xmlsecurity-starter/src/main/java/org/apache/camel/component/xmlsecurity/springboot/XmlVerifierComponentConfiguration.java @@ -0,0 +1,355 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.xmlsecurity.springboot; + +import java.util.Map; +import javax.annotation.Generated; +import javax.xml.crypto.KeySelector; +import javax.xml.crypto.URIDereferencer; +import org.apache.camel.component.xmlsecurity.api.ValidationFailedHandler; +import org.apache.camel.component.xmlsecurity.api.XmlSignature2Message; +import org.apache.camel.component.xmlsecurity.api.XmlSignatureChecker; +import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Used to verify exchanges using the XML signature specification. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Generated("org.apache.camel.springboot.maven.SpringBootAutoConfigurationMojo") +@ConfigurationProperties(prefix = "camel.component.xmlsecurity-verify") +public class XmlVerifierComponentConfiguration + extends + ComponentConfigurationPropertiesCommon { + + /** + * Whether to enable auto configuration of the xmlsecurity-verify component. + * This is enabled by default. + */ + private Boolean enabled; + /** + * Whether the producer should be started lazy (on the first message). By + * starting lazy you can use this to allow CamelContext and routes to + * startup in situations where a producer may otherwise fail during starting + * and cause the route to fail being started. By deferring this startup to + * be lazy then the startup failure can be handled during routing messages + * via Camel's routing error handlers. Beware that when the first message is + * processed then creating and starting the producer may take a little time + * and prolong the total processing time of the processing. + */ + private Boolean lazyStartProducer = false; + /** + * Whether the component should use basic property binding (Camel 2.x) or + * the newer property binding with additional capabilities + */ + private Boolean basicPropertyBinding = false; + /** + * To use a shared XmlVerifierConfiguration configuration to use as base for + * configuring endpoints. + */ + private XmlVerifierConfigurationNestedConfiguration verifierConfiguration; + + public Boolean getLazyStartProducer() { + return lazyStartProducer; + } + + public void setLazyStartProducer(Boolean lazyStartProducer) { + this.lazyStartProducer = lazyStartProducer; + } + + public Boolean getBasicPropertyBinding() { + return basicPropertyBinding; + } + + public void setBasicPropertyBinding(Boolean basicPropertyBinding) { + this.basicPropertyBinding = basicPropertyBinding; + } + + public XmlVerifierConfigurationNestedConfiguration getVerifierConfiguration() { + return verifierConfiguration; + } + + public void setVerifierConfiguration( + XmlVerifierConfigurationNestedConfiguration verifierConfiguration) { + this.verifierConfiguration = verifierConfiguration; + } + + public static class XmlVerifierConfigurationNestedConfiguration { + public static final Class CAMEL_NESTED_CLASS = org.apache.camel.component.xmlsecurity.processor.XmlVerifierConfiguration.class; + /** + * Provides the key for validating the XML signature. + */ + private KeySelector keySelector; + /** + * 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 XmlSignature2Message. + */ + private Object outputNodeSearch; + /** + * Determines the search type for determining the output node which is + * serialized into the output message bodyF. See + * setOutputNodeSearch(Object). The supported default search types you + * can find in DefaultXmlSignature2Message. + */ + private String outputNodeSearchType = "Default"; + /** + * 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 Boolean#FALSE. This parameter is forwarded to + * XmlSignature2Message. This indicator has no effect if the output node + * search is of type + * DefaultXmlSignature2Message#OUTPUT_NODE_SEARCH_TYPE_DEFAULT.F + */ + private Boolean removeSignatureElements = false; + /** + * Enables secure validation. If true then secure validation is enabled. + */ + private Boolean secureValidation = true; + /** + * 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. + */ + private ValidationFailedHandler validationFailedHandler; + /** + * 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. + */ + private XmlSignature2Message xmlSignature2Message; + /** + * 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 + */ + private XmlSignatureChecker xmlSignatureChecker; + /** + * You can set a base URI which is used in the URI dereferencing. + * Relative URIs are then concatenated with the base URI. + */ + private String baseUri; + /** + * Determines if the XML signature specific headers be cleared after + * signing and verification. Defaults to true. + */ + private Boolean clearHeaders = true; + /** + * Sets the crypto context properties. See {link + * XMLCryptoContext#setProperty(String, Object)}. Possible properties + * are defined in XMLSignContext an XMLValidateContext (see Supported + * Properties). The following properties are set by default to the value + * Boolean#TRUE for the XML validation. If you want to switch these + * features off you must set the property value to Boolean#FALSE. + * org.jcp.xml.dsig.validateManifests + * javax.xml.crypto.dsig.cacheReference + */ + private Map cryptoContextProperties; + /** + * Disallows that the incoming XML document contains DTD DOCTYPE + * declaration. The default value is Boolean#TRUE. + */ + private Boolean disallowDoctypeDecl = true; + /** + * Indicator whether the XML declaration in the outgoing message body + * should be omitted. Default value is false. Can be overwritten by the + * header XmlSignatureConstants#HEADER_OMIT_XML_DECLARATION. + */ + private Boolean omitXmlDeclaration = false; + /** + * The character encoding of the resulting signed XML document. If null + * then the encoding of the original XML document is used. + */ + private String outputXmlEncoding; + /** + * 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 + * XmlSignatureConstants#HEADER_SCHEMA_RESOURCE_URI. + */ + private String schemaResourceUri; + /** + * If you want to restrict the remote access via reference URIs, you can + * set an own dereferencer. Optional parameter. If not set the provider + * default dereferencer is used which can resolve URI fragments, HTTP, + * file and XPpointer URIs. Attention: The implementation is provider + * dependent! + */ + private URIDereferencer uriDereferencer; + + public KeySelector getKeySelector() { + return keySelector; + } + + public void setKeySelector(KeySelector keySelector) { + this.keySelector = keySelector; + } + + public Object getOutputNodeSearch() { + return outputNodeSearch; + } + + public void setOutputNodeSearch(Object outputNodeSearch) { + this.outputNodeSearch = outputNodeSearch; + } + + public String getOutputNodeSearchType() { + return outputNodeSearchType; + } + + public void setOutputNodeSearchType(String outputNodeSearchType) { + this.outputNodeSearchType = outputNodeSearchType; + } + + public Boolean getRemoveSignatureElements() { + return removeSignatureElements; + } + + public void setRemoveSignatureElements(Boolean removeSignatureElements) { + this.removeSignatureElements = removeSignatureElements; + } + + public Boolean getSecureValidation() { + return secureValidation; + } + + public void setSecureValidation(Boolean secureValidation) { + this.secureValidation = secureValidation; + } + + public ValidationFailedHandler getValidationFailedHandler() { + return validationFailedHandler; + } + + public void setValidationFailedHandler( + ValidationFailedHandler validationFailedHandler) { + this.validationFailedHandler = validationFailedHandler; + } + + public XmlSignature2Message getXmlSignature2Message() { + return xmlSignature2Message; + } + + public void setXmlSignature2Message( + XmlSignature2Message xmlSignature2Message) { + this.xmlSignature2Message = xmlSignature2Message; + } + + public XmlSignatureChecker getXmlSignatureChecker() { + return xmlSignatureChecker; + } + + public void setXmlSignatureChecker( + XmlSignatureChecker xmlSignatureChecker) { + this.xmlSignatureChecker = xmlSignatureChecker; + } + + public String getBaseUri() { + return baseUri; + } + + public void setBaseUri(String baseUri) { + this.baseUri = baseUri; + } + + public Boolean getClearHeaders() { + return clearHeaders; + } + + public void setClearHeaders(Boolean clearHeaders) { + this.clearHeaders = clearHeaders; + } + + public Map getCryptoContextProperties() { + return cryptoContextProperties; + } + + public void setCryptoContextProperties(Map cryptoContextProperties) { + this.cryptoContextProperties = cryptoContextProperties; + } + + public Boolean getDisallowDoctypeDecl() { + return disallowDoctypeDecl; + } + + public void setDisallowDoctypeDecl(Boolean disallowDoctypeDecl) { + this.disallowDoctypeDecl = disallowDoctypeDecl; + } + + public Boolean getOmitXmlDeclaration() { + return omitXmlDeclaration; + } + + public void setOmitXmlDeclaration(Boolean omitXmlDeclaration) { + this.omitXmlDeclaration = omitXmlDeclaration; + } + + public String getOutputXmlEncoding() { + return outputXmlEncoding; + } + + public void setOutputXmlEncoding(String outputXmlEncoding) { + this.outputXmlEncoding = outputXmlEncoding; + } + + public String getSchemaResourceUri() { + return schemaResourceUri; + } + + public void setSchemaResourceUri(String schemaResourceUri) { + this.schemaResourceUri = schemaResourceUri; + } + + public URIDereferencer getUriDereferencer() { + return uriDereferencer; + } + + public void setUriDereferencer(URIDereferencer uriDereferencer) { + this.uriDereferencer = uriDereferencer; + } + } +} \ No newline at end of file diff --git a/components-starter/camel-xmlsecurity-starter/src/main/resources/META-INF/spring.factories b/components-starter/camel-xmlsecurity-starter/src/main/resources/META-INF/spring.factories index df3988e..c989ea7 100644 --- a/components-starter/camel-xmlsecurity-starter/src/main/resources/META-INF/spring.factories +++ b/components-starter/camel-xmlsecurity-starter/src/main/resources/META-INF/spring.factories @@ -16,5 +16,7 @@ ## --------------------------------------------------------------------------- org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ org.apache.camel.dataformat.xmlsecurity.springboot.XMLSecurityDataFormatAutoConfiguration,\ -org.apache.camel.component.xmlsecurity.springboot.XmlSignatureComponentAutoConfiguration +org.apache.camel.component.xmlsecurity.springboot.XmlSignatureComponentAutoConfiguration,\ +org.apache.camel.component.xmlsecurity.springboot.XmlVerifierComponentAutoConfiguration + diff --git a/docs/modules/ROOT/pages/list.adoc b/docs/modules/ROOT/pages/list.adoc index 6b9f67d..dcc2591 100644 --- a/docs/modules/ROOT/pages/list.adoc +++ b/docs/modules/ROOT/pages/list.adoc @@ -5,7 +5,7 @@ Apache Camel Spring Boot supports the following Camel artifacts as Spring Boot S == Camel Components // components: START -Number of Camel components: 319 in 254 JAR artifacts (1 deprecated) +Number of Camel components: 320 in 254 JAR artifacts (1 deprecated) [width="100%",cols="4,1,5",options="header"] |=== @@ -941,8 +941,11 @@ Number of Camel components: 319 in 254 JAR artifacts (1 deprecated) | link:https://camel.apache.org/components/latest/xj-component.html[XJ] (camel-xj-starter) + `xj:resourceUri` | 3.0 | Transforms json/xml message back and forth using a XSLT. -| link:https://camel.apache.org/components/latest/xmlsecurity-component.html[XML Security] (camel-xmlsecurity-starter) + -`xmlsecurity:command:name` | 2.12 | Used to sign and verify exchanges using the XML signature specification. +| link:https://camel.apache.org/components/latest/xmlsecurity-sign-component.html[XML Security Sign] (camel-xmlsecurity-starter) + +`xmlsecurity-sign:name` | 2.12 | Used to sign exchanges using the XML signature specification. + +| link:https://camel.apache.org/components/latest/xmlsecurity-verify-component.html[XML Security Verify] (camel-xmlsecurity-starter) + +`xmlsecurity-verify:name` | 2.12 | Used to verify exchanges using the XML signature specification. | link:https://camel.apache.org/components/latest/xmpp-component.html[XMPP] (camel-xmpp-starter) + `xmpp:host:port/participant` | 1.0 | To send and receive messages from a XMPP (chat) server.