Class 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.
    • 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
      • testSAML2TrustFailure

        @Test
        public void testSAML2TrustFailure()
                                   throws Exception
        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.
        Throws:
        Exception