public class SAMLSignatureProfileValidator extends Object implements SignaturePrevalidator
Signature
, which validates that the signature meets security-related
requirements indicated by the SAML profile of XML Signature.Constructor and Description |
---|
SAMLSignatureProfileValidator() |
Modifier and Type | Method and Description |
---|---|
void |
validate(Signature signature)
Validate the signature according to the requirements represented by the validator.
|
protected void |
validateObjectChildren(org.apache.xml.security.signature.XMLSignature apacheSig)
Validate that the Signature instance does not contain any ds:Object children.
|
protected org.apache.xml.security.signature.Reference |
validateReference(org.apache.xml.security.signature.XMLSignature apacheSig)
Validate the Signature's SignedInfo Reference.
|
protected void |
validateReferenceURI(String uri,
SignableSAMLObject signableObject)
Validate the Signature's Reference URI.
|
protected void |
validateReferenceURI(String uri,
String id)
Validate the Reference URI and parent ID attribute values.
|
protected void |
validateSignatureImpl(SignatureImpl sigImpl)
Validate an instance of
SignatureImpl , which is in turn based on underlying Apache XML Security
XMLSignature instance. |
protected void |
validateTransforms(org.apache.xml.security.signature.Reference reference)
Validate the transforms included in the Signature Reference.
|
public void validate(@Nonnull Signature signature) throws SignatureException
validate
in interface SignaturePrevalidator
signature
- the signature to evaluateSignatureException
- if the signature does not meet the validator's requirementsprotected void validateSignatureImpl(SignatureImpl sigImpl) throws SignatureException
SignatureImpl
, which is in turn based on underlying Apache XML Security
XMLSignature
instance.sigImpl
- the signature implementation object to validateSignatureException
- thrown if the signature is not valid with respect to the profileprotected org.apache.xml.security.signature.Reference validateReference(org.apache.xml.security.signature.XMLSignature apacheSig) throws SignatureException
apacheSig
- the Apache XML Signature instanceSignatureException
- thrown if the Signature does not contain exactly 1 Reference, or if there is an error
obtaining the Reference instanceprotected void validateReferenceURI(String uri, SignableSAMLObject signableObject) throws SignatureException
uri
- the Signature Reference URI attribute valuesignableObject
- the SignableSAMLObject whose signature is being validatedSignatureException
- if the URI is invalid or doesn't resolve to the expected DOM nodeprotected void validateReferenceURI(String uri, String id) throws SignatureException
uri
- the Signature Reference URI attribute valueid
- the Signature parents ID attribute valueSignatureException
- thrown if the URI or ID attribute values are invalidprotected void validateTransforms(org.apache.xml.security.signature.Reference reference) throws SignatureException
reference
- the Signature reference containing the transforms to evaluateSignatureException
- thrown if the set of transforms is invalidprotected void validateObjectChildren(org.apache.xml.security.signature.XMLSignature apacheSig) throws SignatureException
apacheSig
- the Apache XML Signature instanceSignatureException
- if the signature contains ds:Object childrenCopyright © 2018. All rights reserved.