Package org.apache.wss4j.dom.saml
Class SamlNegativeTest
- java.lang.Object
-
- org.apache.wss4j.dom.saml.SamlNegativeTest
-
public class SamlNegativeTest extends Object
This is a set of test-cases where the SAML Assertion is altered in some way and so we expect an exception to be thrown when processing it.
-
-
Constructor Summary
Constructors Constructor Description SamlNegativeTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testHOKNoKeyInfo()
Test that creates a signed SAML 1.1 authentication assertion that uses holder-of-key, but does not include a KeyInfo in the Subject, and hence will fail processing.void
testHOKNotSigned()
Test that creates a SAML 1.1 authentication assertion that uses holder-of-key, but is not signed, and hence will fail processing.void
testSAML1SignedKeyHolderSigModified()
Test that creates a signed SAML 1.1 Assertion using HOK, but then modifies the signature object by replacing the enveloped transform with the exclusive c14n transform.void
testSAML2AuthnAssertionModified()
Test that creates, sends and processes a signed SAML 2 sender-vouches authentication assertion.void
testSAML2SignedKeyHolderKeyModified()
Test that creates a signed SAML 2 Assertion using HOK, but then modifies the assertion.void
testSAML2TrustFailure()
Test that creates, sends and processes a signed SAML 2 authentication assertion, but it is rejected in processing as the signature on the assertion is not trusted.
-
-
-
Method Detail
-
testSAML2AuthnAssertionModified
@Test public void testSAML2AuthnAssertionModified() throws Exception
Test that creates, sends and processes a signed SAML 2 sender-vouches authentication assertion. The assertion is altered and so the signature validation should fail.- Throws:
Exception
-
testSAML1SignedKeyHolderSigModified
@Test public void testSAML1SignedKeyHolderSigModified() throws Exception
Test that creates a signed SAML 1.1 Assertion using HOK, but then modifies the signature object by replacing the enveloped transform with the exclusive c14n transform. The signature validation should then fail - the enveloped transform is mandatory for a signed assertion.- Throws:
Exception
-
testSAML2SignedKeyHolderKeyModified
@Test public void testSAML2SignedKeyHolderKeyModified() throws Exception
Test that creates a signed SAML 2 Assertion using HOK, but then modifies the assertion. The signature verification should then fail.- Throws:
Exception
-
testHOKNoKeyInfo
@Test public void testHOKNoKeyInfo() throws Exception
Test that creates a signed SAML 1.1 authentication assertion that uses holder-of-key, but does not include a KeyInfo in the Subject, and hence will fail processing.- Throws:
Exception
-
testHOKNotSigned
@Test public void testHOKNotSigned() throws Exception
Test that creates a SAML 1.1 authentication assertion that uses holder-of-key, but is not signed, and hence will fail processing.- Throws:
Exception
-
-