Author: buildbot Date: Fri Dec 19 07:19:14 2014 New Revision: 933316 Log: Production update by buildbot for camel
Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/xml-security-component.html Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/camel/content/xml-security-component.html ============================================================================== --- websites/production/camel/content/xml-security-component.html (original) +++ websites/production/camel/content/xml-security-component.html Fri Dec 19 07:19:14 2014 @@ -299,7 +299,7 @@ </SignedDataObjectProperties> </SignedProperties> </QualifyingProperties>]]></script> -</div></div><p>The properties of the XAdES-BES form are the same except that the <span style="line-height: 1.4285715;"><code>SignaturePolicyIdentifier</code> property is missing. </span></p><p><span style="line-height: 1.4285715;">You can configure the XAdES-BES/EPES properties via the bean <code><span>org.apache.camel.component.xmlsecurity.api.</span>XAdESSignatureProperties</code> or <code>org.apache.camel.component.xmlsecurity.api.DefaultXAdESSignatureProperties. <span>XAdESSignatureProperties</span></code><span> does support all properties mentioned above except the </span></span><code><span style="line-height: 1.4285715;">SigningCertificate </span></code><span style="line-height: 1.4285715;">property. To get the <code><span>SigningCertificate </span></code><span>property, you must overwrite either the method <code>XAdESSignatureProperties.getSigningCertificate() </code>or<code> <span>XAdESSignatureProperties.</span>getSigni ngCertificateChain(). </code>The class <code>DefaultXAdESSignatureProperties</code> overwrites the method <code>getSigningCertificate()</code> and allows you to specify the signing certificate via a keystore and alias. The following example shows all parameters which you can specify, if you do not need certain parameters you can just omit them.</span></span></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>XAdES-BES/EPES example in Java DSL</b></div><div class="codeContent panelContent pdl"> +</div></div><p>The properties of the XAdES-BES form are the same except that the <span style="line-height: 1.4285715;"><code>SignaturePolicyIdentifier</code> property is not püart of XAdES-BES. </span></p><p><span style="line-height: 1.4285715;">You can configure the XAdES-BES/EPES properties via the bean <code><span>org.apache.camel.component.xmlsecurity.api.</span>XAdESSignatureProperties</code> or <code>org.apache.camel.component.xmlsecurity.api.DefaultXAdESSignatureProperties. <span>XAdESSignatureProperties</span></code><span> does support all properties mentioned above except the </span></span><code><span style="line-height: 1.4285715;">SigningCertificate </span></code><span style="line-height: 1.4285715;">property. To get the <code><span>SigningCertificate </span></code><span>property, you must overwrite either the method <code>XAdESSignatureProperties.getSigningCertificate() </code>or<code> <span>XAdESSignatureProper ties.</span>getSigningCertificateChain(). </code>The class <code>DefaultXAdESSignatureProperties</code> overwrites the method <code>getSigningCertificate()</code> and allows you to specify the signing certificate via a keystore and alias. The following example shows all parameters you can specify. If you do not need certain parameters you can just omit them.</span></span></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>XAdES-BES/EPES Example in Java DSL</b></div><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[  Keystore keystore = ... // load a keystore DefaultKeyAccessor accessor = new DefaultKeyAccessor(); accessor.setKeyStore(keystore); @@ -313,7 +313,7 @@ // signing certificate props.setKeystore(keystore)); props.setAlias("cert_alias"); // specify the alias of the signing certificate in the keystore = signer key alias - props.setDigestAlgorithmForSigningCertificate(DigestMethod.SHA256); + props.setDigestAlgorithmForSigningCertificate(DigestMethod.SHA256); // possible values for the algorithm are "http://www.w3.org/2000/09/xmldsig#sha1", "http://www.w3.org/2001/04/xmlenc#sha256", "http://www.w3.org/2001/04/xmldsig-more#sha384", "http://www.w3.org/2001/04/xmlenc#sha512", default value is "http://www.w3.org/2001/04/xmlenc#sha256" props.setSigningCertificateURIs(Collections.singletonList("http://certuri"));  // signing time @@ -321,13 +321,14 @@  // policy props.setSignaturePolicy(XAdESSignatureProperties.SIG_POLICY_EXPLICIT_ID); - // also the values XAdESSignatureProperties.SIG_POLICY_NONE and XAdESSignatureProperties.SIG_POLICY_IMPLIED are possible - // then you must not specify any further policy parameters + // also the values XAdESSignatureProperties.SIG_POLICY_NONE ("None"), and XAdESSignatureProperties.SIG_POLICY_IMPLIED ("Implied")are possible, default value is XAdESSignatureProperties.SIG_POLICY_EXPLICIT_ID ("ExplicitId") + // For "None" and "Implied" you must not specify any further policy parameters props.setSigPolicyId("urn:oid:1.2.840.113549.1.9.16.6.1"); - props.setSigPolicyIdQualifier("OIDAsURN"); + props.setSigPolicyIdQualifier("OIDAsURN"); //allowed values are empty string, "OIDAsURI", "OIDAsURN"; default value is empty string props.setSigPolicyIdDescription("invoice version 3.1"); - props.setSignaturePolicyDigestAlgorithm(DigestMethod.SHA256); + props.setSignaturePolicyDigestAlgorithm(DigestMethod.SHA256);// possible values for the algorithm are "http://www.w3.org/2000/09/xmldsig#sha1", http://www.w3.org/2001/04/xmlenc#sha256", "http://www.w3.org/2001/04/xmldsig-more#sha384", "http://www.w3.org/2001/04/xmlenc#sha512", default value is http://www.w3.org/2001/04/xmlenc#sha256" props.setSignaturePolicyDigestValue("Ohixl6upD6av8N7pEvDABhEL6hM="); + // you can add qualifiers for the signature policy either by specifying text or an XML fragment with the root element "SigPolicyQualifier" props.setSigPolicyQualifiers(Arrays .asList(new String[] { "<SigPolicyQualifier xmlns=\"http://uri.etsi.org/01903/v1.3.2#\"><SPURI>http://test.com/sig.policy.pdf</SPURI><SPUserNotice><ExplicitText>display text</ExplicitText>" @@ -342,7 +343,7 @@ props.setSignatureProductionPlaceStateOrProvince("Bavaria");  //role - // you can add claimed roles either by specifying simple text or an XML fragment with the root element ClaimedRole + // you can add claimed roles either by specifying text or an XML fragment with the root element "ClaimedRole" props.setSignerClaimedRoles(Arrays.asList(new String[] {"test", "<a:ClaimedRole xmlns:a=\"http://uri.etsi.org/01903/v1.3.2#\"><TestRole>TestRole</TestRole></a:ClaimedRole>" })); props.setSignerCertifiedRoles(Collections.singletonList(new XAdESEncapsulatedPKIData("Ahixl6upD6av8N7pEvDABhEL6hM=", @@ -352,18 +353,18 @@ props.setDataObjectFormatDescription("invoice"); props.setDataObjectFormatMimeType("text/xml"); props.setDataObjectFormatIdentifier("urn:oid:1.2.840.113549.1.9.16.6.2"); - props.setDataObjectFormatIdentifierQualifier("OIDAsURN"); + props.setDataObjectFormatIdentifierQualifier("OIDAsURN"); //allowed values are empty string, "OIDAsURI", "OIDAsURN"; default value is empty string props.setDataObjectFormatIdentifierDescription("identifier desc"); props.setDataObjectFormatIdentifierDocumentationReferences(Arrays.asList(new String[] { "http://test.com/dataobject.format.doc.ref1.txt", "http://test.com/dataobject.format.doc.ref2.txt" }));  //commitment props.setCommitmentTypeId("urn:oid:1.2.840.113549.1.9.16.6.4"); - props.setCommitmentTypeIdQualifier("OIDAsURN"); + props.setCommitmentTypeIdQualifier("OIDAsURN"); //allowed values are empty string, "OIDAsURI", "OIDAsURN"; default value is empty string props.setCommitmentTypeIdDescription("description for commitment type ID"); props.setCommitmentTypeIdDocumentationReferences(Arrays.asList(new String[] {"http://test.com/commitment.ref1.txt", "http://test.com/commitment.ref2.txt" })); - // you can specify a commitment type qualifier either by simple text or an XML fragment with root element CommitmentTypeQualifier + // you can specify a commitment type qualifier either by simple text or an XML fragment with root element "CommitmentTypeQualifier" props.setCommitmentTypeQualifiers(Arrays.asList(new String[] {"commitment qualifier", "<c:CommitmentTypeQualifier xmlns:c=\"http://uri.etsi.org/01903/v1.3.2#\"><C>c</C></c:CommitmentTypeQualifier>" }));  @@ -375,7 +376,37 @@ .to("mock:result"); ]]></script> -</div></div><h4 id="XMLSecuritycomponent-Headers">Headers</h4><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Header</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th><th colspan="1" rowspan="1" class="confluenceTh">Description</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelXmlSignatureXAdESQualifyingPropertiesId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">for the 'Id' attribute value of <code>QualifyingProperties</code> element</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelXmlSignatureXAdESSignedDataObjectPropertiesId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">for the 'Id' attribute value of <code>SignedDataObjectProperties</code> element</td></tr><tr><td colspan="1" rowspan="1" class="co nfluenceTd"><p><code>CamelXmlSignatureXAdESSignedSignaturePropertiesId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">for the 'Id' attribute value of  <code>SignedSignatureProperties</code> element</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelXmlSignatureXAdESDataObjectFormatEncoding</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><span>for the value of the </span><code>Encoding</code><span> element of the </span><code>DataObjectFormat</code><span> element</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>CamelXmlSignatureXAdESNamespace</code></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"> overwrites the XAdES namespace parameter value</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><c ode>CamelXmlSignatureXAdESPrefix</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">overwrites the XAdES prefix parameter value</td></tr></tbody></table></div><h4 id="XMLSecuritycomponent-Limitations">Limitations</h4><ul><li>No support for signature form XAdES-T and XAdES-C</li><li>Only signer part implemented.</li><li>No support for the '<code>QualifyingPropertiesReference</code>' element (see section 6.3.2 of spec).</li><li>No support for the <code>Transforms</code> element contained in the <code>SignaturePolicyId</code> element contained in the <code>SignaturePolicyIdentifier element</code></li><li>No support of the <code>CounterSignature</code> element --> no support for the <code>UnsignedProperties</code> element</li><li>At most one <code>DataObjectFormat</code> element. More than one <code>DataObjectFormat </code>element makes no sense  because we have only one data object whic h is signed (this is the incoming message body to the XML signer endpoint).</li><li>At most one <code>CommitmentTypeIndication</code> element. More than one <code>CommitmentTypeIndication</code>element makes no sense  because we have only one data object which is signed (this is the incoming message body to the XML signer endpoint).</li><li><p>A <code>CommitmentTypeIndication</code> element contains always the <code>AllSignedDataObjects</code> element. The <code>ObjectReference</code> element within <code>CommitmentTypeIndication</code>  element is not supported.</p></li><li>The<code> AllDataObjectsTimeStamp</code> element is not supported</li><li>The<code> IndividualDataObjectsTimeStamp</code> element is not supported</li></ul></div><h3 id="XMLSecuritycomponent-SeeAlso">See Also</h3><ul><li><a shape="rect" class="external-link" href="http://www.w3.org/TR/xmldsig-bestpractices/" rel="nofollow">Best Practices</a></li></ul></div> +</div></div><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>XAdES-BES/EPES Example in Spring XML</b></div><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[  ... + <from uri="direct:xades" /> + <to + uri="xmlsecurity:sign://xades?keyAccessor=#accessorRsa&amp;properties=#xadesProperties" /> + <to uri="mock:result" /> + ... + <bean id="xadesProperties" + class="org.apache.camel.component.xmlsecurity.api.XAdESSignatureProperties"> + <!-- For more properties see the the previous Java DSL example. + If you want to have a signing certificate then use the bean class DefaultXAdESSignatureProperties (see the previous Java DSL example). --> + <property name="signaturePolicy" value="ExplicitId" /> + <property name="sigPolicyId" value="http://www.test.com/policy.pdf" /> + <property name="sigPolicyIdDescription" value="factura" /> + <property name="signaturePolicyDigestAlgorithm" value="http://www.w3.org/2000/09/xmldsig#sha1" /> + <property name="signaturePolicyDigestValue" value="Ohixl6upD6av8N7pEvDABhEL1hM=" /> + <property name="signerClaimedRoles" ref="signerClaimedRoles_XMLSigner" /> + <property name="dataObjectFormatDescription" value="Factura electrónica" /> + <property name="dataObjectFormatMimeType" value="text/xml" /> + </bean> + <bean class="java.util.ArrayList" id="signerClaimedRoles_XMLSigner"> + <constructor-arg> + <list> + <value>Emisor</value> + <value>&lt;ClaimedRole + xmlns=&quot;http://uri.etsi.org/01903/v1.3.2#&quot;&gt;&lt;test + xmlns=&quot;http://test.com/&quot;&gt;test&lt;/test&gt;&lt;/ClaimedRole&gt;</value> + </list> + </constructor-arg> + </bean>]]></script> +</div></div><h4 id="XMLSecuritycomponent-Headers">Headers</h4><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Header</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th><th colspan="1" rowspan="1" class="confluenceTh">Description</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelXmlSignatureXAdESQualifyingPropertiesId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">for the 'Id' attribute value of <code>QualifyingProperties</code> element</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelXmlSignatureXAdESSignedDataObjectPropertiesId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">for the 'Id' attribute value of <code>SignedDataObjectProperties</code> element</td></tr><tr><td colspan="1" rowspan="1" class="co nfluenceTd"><p><code>CamelXmlSignatureXAdESSignedSignaturePropertiesId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">for the 'Id' attribute value of  <code>SignedSignatureProperties</code> element</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelXmlSignatureXAdESDataObjectFormatEncoding</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><span>for the value of the </span><code>Encoding</code><span> element of the </span><code>DataObjectFormat</code><span> element</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>CamelXmlSignatureXAdESNamespace</code></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"> overwrites the XAdES namespace parameter value</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><c ode>CamelXmlSignatureXAdESPrefix</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">overwrites the XAdES prefix parameter value</td></tr></tbody></table></div><h4 id="XMLSecuritycomponent-LimitationswithregardtoXAdESversion1.4.2">Limitations with regard to XAdES version 1.4.2</h4><ul><li>No support for signature form XAdES-T and XAdES-C</li><li>Only signer part implemented. Verifier part currently not available.</li><li>No support for the '<code>QualifyingPropertiesReference</code>' element (see section 6.3.2 of spec).</li><li>No support for the <code>Transforms</code> element contained in the <code>SignaturePolicyId</code> element contained in the <code>SignaturePolicyIdentifier element</code></li><li>No support of the <code>CounterSignature</code> element --> no support for the <code>UnsignedProperties</code> element</li><li>At most one <code>DataObjectFormat</code> element. More than o ne <code>DataObjectFormat </code>element makes no sense  because we have only one data object which is signed (this is the incoming message body to the XML signer endpoint).</li><li>At most one <code>CommitmentTypeIndication</code> element. More than one <code>CommitmentTypeIndication</code>element makes no sense  because we have only one data object which is signed (this is the incoming message body to the XML signer endpoint).</li><li><p>A <code>CommitmentTypeIndication</code> element contains always the <code>AllSignedDataObjects</code> element. The <code>ObjectReference</code> element within <code>CommitmentTypeIndication</code>  element is not supported.</p></li><li>The<code> AllDataObjectsTimeStamp</code> element is not supported</li><li>The<code> IndividualDataObjectsTimeStamp</code> element is not supported</li></ul></div><h3 id="XMLSecuritycomponent-SeeAlso">See Also</h3><ul><li><a shape="rect" class="external-link" href="http://www.w3.org/TR/xmldsig-bestprac tices/" rel="nofollow">Best Practices</a></li></ul></div> </td> <td valign="top"> <div class="navigation">