Class XmlSignatureConfiguration
- java.lang.Object
-
- org.apache.camel.component.xmlsecurity.processor.XmlSignatureConfiguration
-
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
XmlSignerConfiguration
,XmlVerifierConfiguration
@UriParams public abstract class XmlSignatureConfiguration extends Object implements Cloneable
-
-
Constructor Summary
Constructors Constructor Description XmlSignatureConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBaseUri()
Boolean
getClearHeaders()
Determines if the XML signature specific headers be cleared after signing and verification.Map<String,? extends Object>
getCryptoContextProperties()
Boolean
getDisallowDoctypeDecl()
Boolean
getOmitXmlDeclaration()
String
getOutputXmlEncoding()
String
getSchemaResourceUri()
URIDereferencer
getUriDereferencer()
void
setBaseUri(String baseUri)
You can set a base URI which is used in the URI dereferencing.void
setClearHeaders(Boolean clearHeaders)
Determines if the XML signature specific headers be cleared after signing and verification.void
setCryptoContextProperties(Map<String,? extends Object> cryptoContextProperties)
Sets the crypto context properties.void
setDisallowDoctypeDecl(Boolean disallowDoctypeDecl)
Disallows that the incoming XML document contains DTD DOCTYPE declaration.void
setOmitXmlDeclaration(Boolean omitXmlDeclaration)
Indicator whether the XML declaration in the outgoing message body should be omitted.void
setOutputXmlEncoding(String outputXmlEncoding)
The character encoding of the resulting signed XML document.void
setSchemaResourceUri(String schemaResourceUri)
Classpath to the XML Schema.void
setUriDereferencer(URIDereferencer uriDereferencer)
If you want to restrict the remote access via reference URIs, you can set an own dereferencer.
-
-
-
Method Detail
-
getUriDereferencer
public URIDereferencer getUriDereferencer()
-
setUriDereferencer
public void setUriDereferencer(URIDereferencer uriDereferencer)
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!
-
getBaseUri
public String getBaseUri()
-
setBaseUri
public void setBaseUri(String baseUri)
You can set a base URI which is used in the URI dereferencing. Relative URIs are then concatenated with the base URI.- See Also:
XMLCryptoContext.setBaseURI(String)
-
setCryptoContextProperties
public void setCryptoContextProperties(Map<String,? extends Object> cryptoContextProperties)
Sets the crypto context properties. SeeXMLCryptoContext.setProperty(String, Object)
. Possible properties are defined inXMLSignContext
anXMLValidateContext
(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 toBoolean.FALSE
."org.jcp.xml.dsig.validateManifests"
"javax.xml.crypto.dsig.cacheReference"
-
getDisallowDoctypeDecl
public Boolean getDisallowDoctypeDecl()
-
setDisallowDoctypeDecl
public void setDisallowDoctypeDecl(Boolean disallowDoctypeDecl)
Disallows that the incoming XML document contains DTD DOCTYPE declaration. The default value isBoolean.TRUE
.- Parameters:
disallowDoctypeDecl
- if set toBoolean.FALSE
then DOCTYPE declaration is allowed, otherwise not
-
getOmitXmlDeclaration
public Boolean getOmitXmlDeclaration()
-
setOmitXmlDeclaration
public void setOmitXmlDeclaration(Boolean omitXmlDeclaration)
Indicator whether the XML declaration in the outgoing message body should be omitted. Default value isfalse
. Can be overwritten by the headerXmlSignatureConstants.HEADER_OMIT_XML_DECLARATION
.
-
getClearHeaders
public Boolean getClearHeaders()
Determines if the XML signature specific headers be cleared after signing and verification. Defaults to true.- Returns:
- true if the Signature headers should be unset, false otherwise
-
setClearHeaders
public void setClearHeaders(Boolean clearHeaders)
Determines if the XML signature specific headers be cleared after signing and verification. Defaults to true.
-
getSchemaResourceUri
public String getSchemaResourceUri()
-
setSchemaResourceUri
public void setSchemaResourceUri(String schemaResourceUri)
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 headerXmlSignatureConstants.HEADER_SCHEMA_RESOURCE_URI
.
-
getOutputXmlEncoding
public String getOutputXmlEncoding()
-
setOutputXmlEncoding
public void setOutputXmlEncoding(String outputXmlEncoding)
The character encoding of the resulting signed XML document. Ifnull
then the encoding of the original XML document is used.
-
-