public class SAML2HTTPPostSimpleSignSecurityHandlerTest
extends org.opensaml.core.xml.XMLObjectBaseTestCase
| Modifier and Type | Field and Description |
|---|---|
private CollectionCredentialResolver |
credResolver |
private String |
expectedRelayValue |
private org.opensaml.saml.saml2.binding.security.impl.SAML2HTTPPostSimpleSignSecurityHandler |
handler |
private String |
issuer |
private org.opensaml.messaging.context.MessageContext<org.opensaml.saml.common.SAMLObject> |
messageContext |
private X509Certificate |
otherCert1 |
private String |
otherCert1Base64 |
private org.opensaml.security.x509.BasicX509Credential |
otherCred1 |
private SignatureTrustEngine |
signatureTrustEngine |
private X509Certificate |
signingCert |
private String |
signingCertBase64 |
private PrivateKey |
signingPrivateKey |
private String |
signingPrivateKeyBase64 |
private org.opensaml.security.x509.BasicX509Credential |
signingX509Cred |
private SignatureValidationParameters |
sigValParams |
private List<org.opensaml.security.credential.Credential> |
trustedCredentials |
private VelocityEngine |
velocityEngine
Velocity template engine.
|
| Constructor and Description |
|---|
SAML2HTTPPostSimpleSignSecurityHandlerTest()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.opensaml.saml.saml2.core.AuthnRequest |
buildInboundSAMLMessage() |
protected org.springframework.mock.web.MockHttpServletRequest |
buildServletRequest() |
private void |
populateRequest(org.springframework.mock.web.MockHttpServletRequest request,
String htmlContentString)
Populate the HTTP servlet request object with the parameter info.
|
protected void |
setUp() |
void |
testBlacklistedSignatureAlgorithm()
Test blacklisted signature algorithm.
|
void |
testFailureNoKeyInfo()
Test context issuer set, valid signature with trusted credential.
|
void |
testInvalidSignature()
Test context issuer set, invalid signature with trusted credential.
|
void |
testNoContextIssuer()
Test context issuer set, valid signature with untrusted credential.
|
void |
testNoTrustEngine()
Test no trust engine supplied.
|
void |
testSuccess()
Test context issuer set, valid signature with trusted credential.
|
void |
testSuccessNoKeyInfo()
Test context issuer set, valid signature with trusted credential.
|
void |
testUntrustedCredential()
Test context issuer set, valid signature with untrusted credential.
|
assertXMLEquals, assertXMLEquals, buildXMLObject, fetchDuration, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElement, unmarshallElementprivate org.opensaml.messaging.context.MessageContext<org.opensaml.saml.common.SAMLObject> messageContext
private org.opensaml.saml.saml2.binding.security.impl.SAML2HTTPPostSimpleSignSecurityHandler handler
private X509Certificate signingCert
private String signingCertBase64
private PrivateKey signingPrivateKey
private String signingPrivateKeyBase64
private X509Certificate otherCert1
private String otherCert1Base64
private CollectionCredentialResolver credResolver
private List<org.opensaml.security.credential.Credential> trustedCredentials
private org.opensaml.security.x509.BasicX509Credential signingX509Cred
private org.opensaml.security.x509.BasicX509Credential otherCred1
private String issuer
private String expectedRelayValue
private SignatureTrustEngine signatureTrustEngine
private SignatureValidationParameters sigValParams
private VelocityEngine velocityEngine
public void testSuccess()
throws org.opensaml.messaging.handler.MessageHandlerException
org.opensaml.messaging.handler.MessageHandlerExceptionpublic void testBlacklistedSignatureAlgorithm()
throws org.opensaml.messaging.handler.MessageHandlerException
org.opensaml.messaging.handler.MessageHandlerExceptionpublic void testUntrustedCredential()
throws org.opensaml.messaging.handler.MessageHandlerException
org.opensaml.messaging.handler.MessageHandlerExceptionpublic void testInvalidSignature()
throws org.opensaml.messaging.handler.MessageHandlerException
org.opensaml.messaging.handler.MessageHandlerExceptionpublic void testNoContextIssuer()
throws org.opensaml.messaging.handler.MessageHandlerException
org.opensaml.messaging.handler.MessageHandlerExceptionpublic void testSuccessNoKeyInfo()
throws org.opensaml.messaging.handler.MessageHandlerException
org.opensaml.messaging.handler.MessageHandlerExceptionpublic void testFailureNoKeyInfo()
throws org.opensaml.messaging.handler.MessageHandlerException
org.opensaml.messaging.handler.MessageHandlerExceptionpublic void testNoTrustEngine()
throws org.opensaml.messaging.handler.MessageHandlerException
org.opensaml.messaging.handler.MessageHandlerExceptionprotected org.opensaml.saml.saml2.core.AuthnRequest buildInboundSAMLMessage()
protected org.springframework.mock.web.MockHttpServletRequest buildServletRequest()
private void populateRequest(org.springframework.mock.web.MockHttpServletRequest request,
String htmlContentString)
throws XMLParserException,
ComponentInitializationException
request - htmlContentString - XMLParserExceptionComponentInitializationExceptionCopyright © 1999–2019 Shibboleth Consortium. All rights reserved.