public class SAMLProtocolMessageXMLSignatureSecurityHandler extends BaseSAMLXMLSignatureSecurityHandler
SAMLObject which represents
the SAML protocol message being processed.
If the message is not an instance of SignableSAMLObject, then no processing is performed. If signature
validation is successful, and the SAML message context issuer was not previously authenticated, then the context's
authentication state will be set to true.
If an optional SAMLSignatureProfileValidator or subclass is supplied, this validator will be used to validate
the XML Signature element prior to the actual cryptographic validation of the signature. This might for example be
used to enforce certain signature profile requirements or to detect signatures upon which it would be unsafe to
attempt cryptographic processing. The validator will default to SAMLSignatureProfileValidator.
| Modifier and Type | Field and Description |
|---|---|
private org.slf4j.Logger |
log
Logger.
|
private SignaturePrevalidator |
signaturePrevalidator
Validator for XML Signature instances.
|
| Constructor and Description |
|---|
SAMLProtocolMessageXMLSignatureSecurityHandler()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doEvaluate(Signature signature,
SignableSAMLObject signableObject,
MessageContext messageContext)
Perform cryptographic validation and trust evaluation on the Signature token using the configured Signature
trust engine.
|
void |
doInvoke(MessageContext messageContext)
Performs the handler logic.
|
SignaturePrevalidator |
getSignaturePrevalidator()
Get the prevalidator for XML Signature instances.
|
protected void |
performPrevalidation(Signature signature)
Perform pre-validation on the Signature token.
|
void |
setSignaturePrevalidator(SignaturePrevalidator validator)
Set the prevalidator for XML Signature instances.
|
buildCriteriaSet, doPreInvoke, getSAMLPeerEntityContext, getSAMLProtocolContext, resolveTrustEngineevaluate, evaluate, getTrustEnginedoPostInvoke, doPostInvoke, getLogPrefix, invokedestroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized@Nonnull private final org.slf4j.Logger log
@Nullable private SignaturePrevalidator signaturePrevalidator
public SAMLProtocolMessageXMLSignatureSecurityHandler()
SAMLSignatureProfileValidator.@Nullable public SignaturePrevalidator getSignaturePrevalidator()
public void setSignaturePrevalidator(@Nullable
SignaturePrevalidator validator)
validator - The prevalidator to set.public void doInvoke(@Nonnull
MessageContext messageContext)
throws MessageHandlerException
doInvoke in class AbstractMessageHandlermessageContext - the message context on which to invoke the handlerMessageHandlerException - if there is an error invoking the handler on the message contextprotected void doEvaluate(@Nonnull
Signature signature,
@Nonnull
SignableSAMLObject signableObject,
@Nonnull
MessageContext messageContext)
throws MessageHandlerException
signature - the signature which is being evaluatedsignableObject - the signable object which contained the signaturemessageContext - the SAML message context being processedMessageHandlerException - thrown if the signature fails validationprotected void performPrevalidation(@Nonnull
Signature signature)
throws MessageHandlerException
signature - the signature to evaluateMessageHandlerException - thrown if the signature element fails pre-validation