public abstract class BaseSAMLSimpleSignatureSecurityPolicyRule extends Object implements SecurityPolicyRule
修飾子 | コンストラクタと説明 |
---|---|
protected |
BaseSAMLSimpleSignatureSecurityPolicyRule(SignatureTrustEngine engine)
Constructor.
|
修飾子とタイプ | メソッドと説明 |
---|---|
protected CriteriaSet |
buildCriteriaSet(String entityID,
SAMLMessageContext samlContext)
Build a criteria set suitable for input to the trust engine.
|
protected String |
deriveSignerEntityID(SAMLMessageContext samlContext)
Derive the signer's entity ID from the message context.
|
void |
evaluate(MessageContext messageContext)
Evaluates the message context against the rule.
|
protected List<Credential> |
getRequestCredentials(javax.servlet.http.HttpServletRequest request,
SAMLMessageContext samlContext)
Extract any candidate validation credentials from the request and/or message context.
|
protected byte[] |
getSignature(javax.servlet.http.HttpServletRequest request)
Extract the signature value from the request, in the form suitable for input into
SignatureTrustEngine.validate(byte[], byte[], String, CriteriaSet, Credential) . |
protected String |
getSignatureAlgorithm(javax.servlet.http.HttpServletRequest request)
Extract the signature algorithm URI value from the request.
|
protected abstract byte[] |
getSignedContent(javax.servlet.http.HttpServletRequest request)
Get the content over which to validate the signature, in the form suitable for input into
SignatureTrustEngine.validate(byte[], byte[], String, CriteriaSet, Credential) . |
protected SignatureTrustEngine |
getTrustEngine()
Gets the engine used to validate the signature.
|
protected abstract boolean |
ruleHandles(javax.servlet.http.HttpServletRequest request,
SAMLMessageContext samlMsgCtx)
Determine whether the rule should handle the request, based on the unwrapped HTTP servlet request and/or message
context.
|
protected boolean |
validateSignature(byte[] signature,
byte[] signedContent,
String algorithmURI,
CriteriaSet criteriaSet,
List<Credential> candidateCredentials)
Validate the simple signature.
|
protected BaseSAMLSimpleSignatureSecurityPolicyRule(SignatureTrustEngine engine)
engine
- the signature trust engine to use for signature validataionpublic void evaluate(MessageContext messageContext) throws SecurityPolicyException
evaluate
インタフェース内 SecurityPolicyRule
messageContext
- the message context being evaluatedSecurityPolicyException
- thrown if the message context does not meet the requirements of the rule,
or if there is a non-recoverable error during evaluationprotected boolean validateSignature(byte[] signature, byte[] signedContent, String algorithmURI, CriteriaSet criteriaSet, List<Credential> candidateCredentials) throws SecurityPolicyException
signature
- the signature valuesignedContent
- the content that was signedalgorithmURI
- the signature algorithm URI which was used to sign the contentcriteriaSet
- criteria used to describe and/or resolve the information which serves as the basis for trust
evaluationcandidateCredentials
- the request-derived candidate credential(s) containing the validation key for the
signature (optional)SecurityPolicyException
- thrown if there are errors during the signature validation processprotected List<Credential> getRequestCredentials(javax.servlet.http.HttpServletRequest request, SAMLMessageContext samlContext) throws SecurityPolicyException
request
- the HTTP servlet request being processedsamlContext
- the SAML message context being processedSecurityPolicyException
- thrown if there is an error during request processingprotected SignatureTrustEngine getTrustEngine()
protected byte[] getSignature(javax.servlet.http.HttpServletRequest request) throws SecurityPolicyException
SignatureTrustEngine.validate(byte[], byte[], String, CriteriaSet, Credential)
.
Defaults to the Base64-decoded value of the HTTP request parameter named Signature
.request
- the HTTP servlet requestSecurityPolicyException
- thrown if there is an error during request processingprotected String getSignatureAlgorithm(javax.servlet.http.HttpServletRequest request) throws SecurityPolicyException
SigAlg
.request
- the HTTP servlet requestSecurityPolicyException
- thrown if there is an error during request processingprotected String deriveSignerEntityID(SAMLMessageContext samlContext) throws SecurityPolicyException
samlContext
- the SAML message context being processedSecurityPolicyException
- thrown if there is an error during request processingprotected CriteriaSet buildCriteriaSet(String entityID, SAMLMessageContext samlContext) throws SecurityPolicyException
entityID
- the candidate issuer entity ID which is being evaluatedsamlContext
- the message context which is being evaluatedSecurityPolicyException
- thrown if criteria set can not be constructedprotected abstract byte[] getSignedContent(javax.servlet.http.HttpServletRequest request) throws SecurityPolicyException
SignatureTrustEngine.validate(byte[], byte[], String, CriteriaSet, Credential)
.request
- the HTTP servlet request being processedSecurityPolicyException
- thrown if there is an error during request processingprotected abstract boolean ruleHandles(javax.servlet.http.HttpServletRequest request, SAMLMessageContext samlMsgCtx) throws SecurityPolicyException
request
- the HTTP servlet request being processedsamlMsgCtx
- the SAML message context being processedSecurityPolicyException
- thrown if there is an error during request processingCopyright © 2012. All Rights Reserved.