- Apache xml security java
- Methods inherited from class org.apache.xml.security.utils.SignatureElementProxy
- Methods inherited from class org.apache.xml.security.utils.ElementProxy
- Methods inherited from class java.lang.Object
- Field Detail
- ALGO_ID_MAC_HMAC_SHA1
- ALGO_ID_SIGNATURE_DSA
- ALGO_ID_SIGNATURE_DSA_SHA256
- ALGO_ID_SIGNATURE_RSA
- ALGO_ID_SIGNATURE_RSA_SHA1
- ALGO_ID_SIGNATURE_NOT_RECOMMENDED_RSA_MD5
- ALGO_ID_SIGNATURE_RSA_RIPEMD160
- ALGO_ID_SIGNATURE_RSA_SHA224
- ALGO_ID_SIGNATURE_RSA_SHA256
- ALGO_ID_SIGNATURE_RSA_SHA384
- ALGO_ID_SIGNATURE_RSA_SHA512
- ALGO_ID_SIGNATURE_RSA_SHA1_MGF1
- ALGO_ID_SIGNATURE_RSA_SHA224_MGF1
- ALGO_ID_SIGNATURE_RSA_SHA256_MGF1
- ALGO_ID_SIGNATURE_RSA_SHA384_MGF1
- ALGO_ID_SIGNATURE_RSA_SHA512_MGF1
- ALGO_ID_SIGNATURE_RSA_SHA3_224_MGF1
- ALGO_ID_SIGNATURE_RSA_SHA3_256_MGF1
- ALGO_ID_SIGNATURE_RSA_SHA3_384_MGF1
- ALGO_ID_SIGNATURE_RSA_SHA3_512_MGF1
- ALGO_ID_MAC_HMAC_NOT_RECOMMENDED_MD5
- ALGO_ID_MAC_HMAC_RIPEMD160
- ALGO_ID_MAC_HMAC_SHA224
- ALGO_ID_MAC_HMAC_SHA256
- ALGO_ID_MAC_HMAC_SHA384
- ALGO_ID_MAC_HMAC_SHA512
- ALGO_ID_SIGNATURE_ECDSA_SHA1
- ALGO_ID_SIGNATURE_ECDSA_SHA224
- ALGO_ID_SIGNATURE_ECDSA_SHA256
- ALGO_ID_SIGNATURE_ECDSA_SHA384
- ALGO_ID_SIGNATURE_ECDSA_SHA512
- ALGO_ID_SIGNATURE_ECDSA_RIPEMD160
- ALGO_ID_SIGNATURE_RSA_PSS
- Constructor Detail
- XMLSignature
- XMLSignature
- XMLSignature
- XMLSignature
- XMLSignature
- XMLSignature
- XMLSignature
- XMLSignature
- XMLSignature
- XMLSignature
- XMLSignature
- XMLSignature
- XMLSignature
- XMLSignature
- Welcome to Apache Santuario™
- News
- Older News
- Apache XML Security for Java
- License
- Categories
- GroupId
- ArtifactId
- Last Version
- Release Date
- Type
- Description
- Project URL
- Project Organization
- Download xmlsec
- Dependencies
- compile (3)
- provided (1)
- runtime (1)
- test (11)
- Project Modules
- Versions
- Apache xml security java
- Constructor Summary
- Method Summary
- Methods inherited from class java.lang.Object
- Constructor Detail
- XMLSec
- Method Detail
- init
- getOutboundXMLSec
- getInboundWSSec
- validateAndApplyDefaultsToOutboundSecurityProperties
- validateAndApplyDefaultsToInboundSecurityProperties
Apache xml security java
Verifies if the signature is valid by redigesting all References, comparing those against the stored DigestValues and then checking to see if the Signatures match on the SignedInfo.
Extracts the public key from the certificate and verifies if the signature is valid by re-digesting all References, comparing those against the stored DigestValues and then checking to see if the Signatures match on the SignedInfo.
Digests all References in the SignedInfo, calculates the signature value and sets it in the SignatureValue Element.
Methods inherited from class org.apache.xml.security.utils.SignatureElementProxy
Methods inherited from class org.apache.xml.security.utils.ElementProxy
Methods inherited from class java.lang.Object
Field Detail
ALGO_ID_MAC_HMAC_SHA1
ALGO_ID_SIGNATURE_DSA
ALGO_ID_SIGNATURE_DSA_SHA256
public static final String ALGO_ID_SIGNATURE_DSA_SHA256
ALGO_ID_SIGNATURE_RSA
ALGO_ID_SIGNATURE_RSA_SHA1
public static final String ALGO_ID_SIGNATURE_RSA_SHA1
ALGO_ID_SIGNATURE_NOT_RECOMMENDED_RSA_MD5
public static final String ALGO_ID_SIGNATURE_NOT_RECOMMENDED_RSA_MD5
ALGO_ID_SIGNATURE_RSA_RIPEMD160
public static final String ALGO_ID_SIGNATURE_RSA_RIPEMD160
ALGO_ID_SIGNATURE_RSA_SHA224
public static final String ALGO_ID_SIGNATURE_RSA_SHA224
ALGO_ID_SIGNATURE_RSA_SHA256
public static final String ALGO_ID_SIGNATURE_RSA_SHA256
ALGO_ID_SIGNATURE_RSA_SHA384
public static final String ALGO_ID_SIGNATURE_RSA_SHA384
ALGO_ID_SIGNATURE_RSA_SHA512
public static final String ALGO_ID_SIGNATURE_RSA_SHA512
ALGO_ID_SIGNATURE_RSA_SHA1_MGF1
public static final String ALGO_ID_SIGNATURE_RSA_SHA1_MGF1
ALGO_ID_SIGNATURE_RSA_SHA224_MGF1
public static final String ALGO_ID_SIGNATURE_RSA_SHA224_MGF1
ALGO_ID_SIGNATURE_RSA_SHA256_MGF1
public static final String ALGO_ID_SIGNATURE_RSA_SHA256_MGF1
ALGO_ID_SIGNATURE_RSA_SHA384_MGF1
public static final String ALGO_ID_SIGNATURE_RSA_SHA384_MGF1
ALGO_ID_SIGNATURE_RSA_SHA512_MGF1
public static final String ALGO_ID_SIGNATURE_RSA_SHA512_MGF1
ALGO_ID_SIGNATURE_RSA_SHA3_224_MGF1
public static final String ALGO_ID_SIGNATURE_RSA_SHA3_224_MGF1
ALGO_ID_SIGNATURE_RSA_SHA3_256_MGF1
public static final String ALGO_ID_SIGNATURE_RSA_SHA3_256_MGF1
ALGO_ID_SIGNATURE_RSA_SHA3_384_MGF1
public static final String ALGO_ID_SIGNATURE_RSA_SHA3_384_MGF1
ALGO_ID_SIGNATURE_RSA_SHA3_512_MGF1
public static final String ALGO_ID_SIGNATURE_RSA_SHA3_512_MGF1
ALGO_ID_MAC_HMAC_NOT_RECOMMENDED_MD5
public static final String ALGO_ID_MAC_HMAC_NOT_RECOMMENDED_MD5
ALGO_ID_MAC_HMAC_RIPEMD160
public static final String ALGO_ID_MAC_HMAC_RIPEMD160
ALGO_ID_MAC_HMAC_SHA224
ALGO_ID_MAC_HMAC_SHA256
ALGO_ID_MAC_HMAC_SHA384
ALGO_ID_MAC_HMAC_SHA512
ALGO_ID_SIGNATURE_ECDSA_SHA1
public static final String ALGO_ID_SIGNATURE_ECDSA_SHA1
ALGO_ID_SIGNATURE_ECDSA_SHA224
public static final String ALGO_ID_SIGNATURE_ECDSA_SHA224
ALGO_ID_SIGNATURE_ECDSA_SHA256
public static final String ALGO_ID_SIGNATURE_ECDSA_SHA256
ALGO_ID_SIGNATURE_ECDSA_SHA384
public static final String ALGO_ID_SIGNATURE_ECDSA_SHA384
ALGO_ID_SIGNATURE_ECDSA_SHA512
public static final String ALGO_ID_SIGNATURE_ECDSA_SHA512
ALGO_ID_SIGNATURE_ECDSA_RIPEMD160
public static final String ALGO_ID_SIGNATURE_ECDSA_RIPEMD160
ALGO_ID_SIGNATURE_RSA_PSS
public static final String ALGO_ID_SIGNATURE_RSA_PSS
Constructor Detail
XMLSignature
public XMLSignature(Document doc, String baseURI, String signatureMethodURI) throws XMLSecurityException
This creates a new ds:Signature Element and adds an empty ds:SignedInfo . The ds:SignedInfo is initialized with the specified Signature algorithm and Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS which is REQUIRED by the spec. This method’s main use is for creating a new signature.
XMLSignature
public XMLSignature(Document doc, String baseURI, String signatureMethodURI, Provider provider) throws XMLSecurityException
This creates a new ds:Signature Element and adds an empty ds:SignedInfo . The ds:SignedInfo is initialized with the specified Signature algorithm and Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS which is REQUIRED by the spec. This method’s main use is for creating a new signature.
XMLSignature
public XMLSignature(Document doc, String baseURI, String signatureMethodURI, int hmacOutputLength) throws XMLSecurityException
XMLSignature
public XMLSignature(Document doc, String baseURI, String signatureMethodURI, int hmacOutputLength, Provider provider) throws XMLSecurityException
XMLSignature
public XMLSignature(Document doc, String baseURI, String signatureMethodURI, String canonicalizationMethodURI) throws XMLSecurityException
XMLSignature
public XMLSignature(Document doc, String baseURI, String signatureMethodURI, String canonicalizationMethodURI, Provider provider) throws XMLSecurityException
XMLSignature
public XMLSignature(Document doc, String baseURI, String signatureMethodURI, int hmacOutputLength, String canonicalizationMethodURI) throws XMLSecurityException
XMLSignature
public XMLSignature(Document doc, String baseURI, String signatureMethodURI, int hmacOutputLength, String canonicalizationMethodURI, Provider provider, AlgorithmParameterSpec spec) throws XMLSecurityException
XMLSignature
public XMLSignature(Document doc, String baseURI, Element signatureMethodElem, Element canonicalizationMethodElem) throws XMLSecurityException
XMLSignature
public XMLSignature(Document doc, String baseURI, Element signatureMethodElem, Element canonicalizationMethodElem, Provider provider) throws XMLSecurityException
XMLSignature
public XMLSignature(Element element, String baseURI) throws XMLSignatureException, XMLSecurityException
This will parse the element and construct the Java Objects. That will allow a user to validate the signature.
XMLSignature
public XMLSignature(Element element, String baseURI, Provider provider) throws XMLSignatureException, XMLSecurityException
This will parse the element and construct the Java Objects. That will allow a user to validate the signature.
XMLSignature
public XMLSignature(Element element, String baseURI, boolean secureValidation) throws XMLSignatureException, XMLSecurityException
This will parse the element and construct the Java Objects. That will allow a user to validate the signature.
XMLSignature
public XMLSignature(Element element, String baseURI, boolean secureValidation, Provider provider) throws XMLSignatureException, XMLSecurityException
This will parse the element and construct the Java Objects. That will allow a user to validate the signature.
Welcome to Apache Santuario™
The Apache Santuario™ project is aimed at providing implementation of the primary security standards for XML:
Two libraries are currently available.
- Apache XML Security for Java: This library includes the standard JSR-105 (Java XML Digital Signature) API, a mature DOM-based implementation of both XML Signature and XML Encryption, as well as a more recent StAX-based (streaming) XML Signature and XML Encryption implementation.
- Apache XML Security for C++: This library includes a mature Digital Signature and Encryption implementation using a proprietary C++ API on top of the Xerces-C XML Parser’s DOM API. It includes a pluggable cryptographic layer, but support for alternatives to OpenSSL are less complete and less mature.
News
March 2023
Versions 3.0.2 and 2.3.3 of the Apache XML Security for Java library have been released. Support for the EdDSA has been added as part of these releases.
September 2022
Versions 3.0.1 and 2.3.2 of the Apache XML Security for Java library have been released. The main change is to remove Xalan as a provided (optional) dependency. This means that support for the XML Signature here() function is removed by default, but can be configured if needed (see this test for an example which plugs in this custom XPath implementation).
November 2021
Version 2.3.0 of the Apache XML Security for Java library has been released. This is a major new release of the library. Some of the significant changes include:
- A rewrite for the StAX output processor chain to make it
deterministic — https://issues.apache.org/jira/browse/SANTUARIO-555 - Secure Validation is now enabled by default —
https://issues.apache.org/jira/browse/SANTUARIO-574 - Local + HTTP ResourceResolvers are disabled by default —
https://issues.apache.org/jira/browse/SANTUARIO-573
November 2021
Version 2.0.4 of the Apache XML Security for C++ library has been released. This release fixes a regression in 2.0.3 allowing the code to build on pre-1.1 OpenSSL versions.
Older News
(edit page) (add comment)
Apache Santuario, Apache, the Apache feather logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Apache XML Security for Java
Apache XML Security for Java supports XML-Signature Syntax and Processing, W3C Recommendation 12 February 2002, and XML Encryption Syntax and Processing, W3C Recommendation 10 December 2002. As of version 1.4, the library supports the standard Java API JSR-105: XML Digital Signature APIs.
License
Categories
GroupId
ArtifactId
Last Version
Release Date
Type
Description
Apache XML Security for Java supports XML-Signature Syntax and Processing, W3C Recommendation 12 February 2002, and XML Encryption Syntax and Processing, W3C Recommendation 10 December 2002. As of version 1.4, the library supports the standard Java API JSR-105: XML Digital Signature APIs.
Project URL
Project Organization
Download xmlsec
Dependencies
compile (3)
provided (1)
runtime (1)
test (11)
Group / Artifact | Type | Version |
---|---|---|
org.apache.logging.log4j : log4j-slf4j-impl | jar | 2.17.2 |
org.junit.jupiter : junit-jupiter-engine | jar | 5.8.0 |
org.xmlunit : xmlunit-core | jar | 2.8.2 |
org.hamcrest : hamcrest-library | jar | 2.2 |
org.xmlunit : xmlunit-matchers | jar | 2.8.2 |
org.eclipse.jetty : jetty-server | jar | 9.4.45.v20220203 |
org.eclipse.jetty : jetty-servlet | jar | 9.4.45.v20220203 |
org.eclipse.jetty : jetty-servlets | jar | 9.4.45.v20220203 |
org.bouncycastle : bcprov-jdk15on | jar | 1.70 |
com.carrotsearch : junit-benchmarks | jar | 0.7.2 |
org.glassfish.jaxb : jaxb-runtime | jar | 3.0.2 |
Project Modules
Versions
Version |
---|
3.0.0 Apr 28, 2022 |
2.3.1 Apr 28, 2022 |
2.3.0 Oct 25, 2021 |
2.2.4 Apr 29, 2022 |
2.2.3 Sep 10, 2021 |
2.2.2 Apr 30, 2021 |
2.2.1 Dec 8, 2020 |
2.2.0 May 26, 2020 |
2.1.8 Apr 29, 2022 |
2.1.7 Sep 10, 2021 |
2.1.6 Dec 8, 2020 |
2.1.5 Mar 10, 2020 |
2.1.4 Jul 16, 2019 |
2.1.3 Mar 26, 2019 |
2.1.2 Jun 8, 2018 |
2.1.1 Jan 22, 2018 |
2.1.0 Aug 14, 2017 |
2.0.10 Jan 22, 2018 |
2.0.9 Aug 14, 2017 |
2.0.8 Dec 1, 2016 |
2.0.7 Jun 13, 2016 |
2.0.6 Dec 4, 2015 |
2.0.5 Jul 10, 2015 |
2.0.4 Apr 15, 2015 |
2.0.3 Jan 9, 2015 |
2.0.2 Sep 22, 2014 |
2.0.1 Jun 27, 2014 |
2.0.0 Apr 28, 2014 |
2.0.0-rc1 Jan 27, 2014 |
2.0.0-beta Oct 22, 2013 |
1.5.8 Jan 9, 2015 |
1.5.7 Jun 27, 2014 |
1.5.6 Nov 5, 2013 |
1.5.5 Jun 17, 2013 |
1.5.4 Mar 15, 2013 |
1.5.3 Oct 15, 2012 |
1.5.2 May 14, 2012 |
1.5.1 Feb 24, 2012 |
1.5.0 Jan 23, 2012 |
1.4.8 Jun 17, 2013 |
1.4.7 May 14, 2012 |
1.4.6 Oct 21, 2011 |
1.4.5 May 23, 2011 |
1.4.4 Nov 18, 2010 |
1.4.3 Jul 23, 2009 |
1.4.2 Sep 11, 2008 |
1.4.1 Sep 11, 2008 |
1.4.0 Apr 23, 2007 |
Apache xml security java
This is the central class of the streaming XML-security framework. Instances of the inbound and outbound security streams can be retrieved with this class.
Constructor Summary
Method Summary
Validates the user supplied configuration and applies default values as appropriate for the inbound security engine
Validates the user supplied configuration and applies default values as appropriate for the outbound security engine
Methods inherited from class java.lang.Object
Constructor Detail
XMLSec
Method Detail
init
getOutboundXMLSec
public static OutboundXMLSec getOutboundXMLSec(XMLSecurityProperties securityProperties) throws XMLSecurityException
getInboundWSSec
public static InboundXMLSec getInboundWSSec(XMLSecurityProperties securityProperties) throws XMLSecurityException
validateAndApplyDefaultsToOutboundSecurityProperties
public static XMLSecurityProperties validateAndApplyDefaultsToOutboundSecurityProperties(XMLSecurityProperties securityProperties) throws XMLSecurityConfigurationException
Validates the user supplied configuration and applies default values as appropriate for the outbound security engine
validateAndApplyDefaultsToInboundSecurityProperties
public static XMLSecurityProperties validateAndApplyDefaultsToInboundSecurityProperties(XMLSecurityProperties securityProperties) throws XMLSecurityConfigurationException
Validates the user supplied configuration and applies default values as appropriate for the inbound security engine