Class SAMLProtocolMessageXMLSignatureSecurityHandlerTest
- java.lang.Object
-
- org.opensaml.core.testing.OpenSAMLInitBaseTestCase
-
- org.opensaml.core.testing.XMLObjectBaseTestCase
-
- org.opensaml.saml.common.binding.security.impl.SAMLProtocolMessageXMLSignatureSecurityHandlerTest
-
public class SAMLProtocolMessageXMLSignatureSecurityHandlerTest extends XMLObjectBaseTestCase
Test SAML protocol message XML signature message handler.
-
-
Field Summary
Fields Modifier and Type Field Description private CollectionCredentialResolvercredResolverprivate SAMLProtocolMessageXMLSignatureSecurityHandlerhandlerprivate Stringissuerprivate MessageContextmessageContextprivate X509CertificateotherCert1private StringotherCert1Base64private SignatureTrustEnginesignatureTrustEngineprivate X509CertificatesigningCertprivate StringsigningCertBase64private BasicX509CredentialsigningX509Credprivate SignatureValidationParameterssigValParamsprivate List<Credential>trustedCredentials-
Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory
-
-
Constructor Summary
Constructors Constructor Description SAMLProtocolMessageXMLSignatureSecurityHandlerTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AuthnRequestbuildInboundSAMLMessage()protected voidsetUp()voidtestBlacklistedSigntureAlgorithm()Test blacklisted signature algorithm.voidtestInvalidSignature()Test context issuer set, invalid signature with trusted credential.voidtestNoContextIssuer()Test context issuer set, valid signature with untrusted credential.voidtestNoTrustEngine()Test no trust engine supplied.voidtestSuccess()Test context issuer set, valid signature with trusted credential.voidtestUntrustedCredential()Test context issuer set, valid signature with untrusted credential.-
Methods inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
assertXMLEquals, assertXMLEquals, buildXMLObject, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElement, unmarshallElement
-
Methods inherited from class org.opensaml.core.testing.OpenSAMLInitBaseTestCase
initOpenSAML
-
-
-
-
Field Detail
-
messageContext
private MessageContext messageContext
-
handler
private SAMLProtocolMessageXMLSignatureSecurityHandler handler
-
signingCert
private X509Certificate signingCert
-
signingCertBase64
private String signingCertBase64
-
otherCert1
private X509Certificate otherCert1
-
otherCert1Base64
private String otherCert1Base64
-
credResolver
private CollectionCredentialResolver credResolver
-
trustedCredentials
private List<Credential> trustedCredentials
-
signingX509Cred
private BasicX509Credential signingX509Cred
-
issuer
private String issuer
-
signatureTrustEngine
private SignatureTrustEngine signatureTrustEngine
-
sigValParams
private SignatureValidationParameters sigValParams
-
-
Method Detail
-
testSuccess
public void testSuccess() throws MessageHandlerExceptionTest context issuer set, valid signature with trusted credential.- Throws:
MessageHandlerException- ...
-
testBlacklistedSigntureAlgorithm
public void testBlacklistedSigntureAlgorithm() throws MessageHandlerExceptionTest blacklisted signature algorithm.- Throws:
MessageHandlerException- ...
-
testUntrustedCredential
public void testUntrustedCredential() throws MessageHandlerExceptionTest context issuer set, valid signature with untrusted credential.- Throws:
MessageHandlerException- ...
-
testInvalidSignature
public void testInvalidSignature() throws MessageHandlerExceptionTest context issuer set, invalid signature with trusted credential.- Throws:
MessageHandlerException- ...
-
testNoContextIssuer
public void testNoContextIssuer() throws MessageHandlerExceptionTest context issuer set, valid signature with untrusted credential.- Throws:
MessageHandlerException- ...
-
testNoTrustEngine
public void testNoTrustEngine() throws MessageHandlerExceptionTest no trust engine supplied.- Throws:
MessageHandlerException- ...
-
buildInboundSAMLMessage
protected AuthnRequest buildInboundSAMLMessage()
-
-