org.apache.ws.security.message
Class ModifiedRequestTest

java.lang.Object
  extended by org.junit.Assert
      extended by org.apache.ws.security.message.ModifiedRequestTest

public class ModifiedRequestTest
extends org.junit.Assert

This class tests the modification of requests.


Constructor Summary
ModifiedRequestTest()
           
 
Method Summary
 void testDuplicatedSignedSAMLAssertion()
          Test a duplicated signed SAML Assertion.
 void testDuplicatedSignedUsernameToken()
          Test a duplicated signed UsernameToken
 void testModifiedEncryptedDataCipherValue()
          Test for when some EncryptedData CipherValue data is modified.
 void testModifiedEncryptedDataStructure()
          Test for when an EncryptedData structure is modified
 void testModifiedEncryptedKeyCipherValue()
          Test for when some EncryptedKey CipherValue data is modified.
 void testModifiedSignature()
          Test for when the Signature element is modified
 void testModifiedSignatureReference()
          Test for when an element that a Signature Reference points to is modified
 void testMovedElement()
          Test that signs a SOAP body element "value".
 void testMovedElementChangedId()
          Test that signs a SOAP body element "value".
 void testUntrustedSignature()
          Test for when a Signature is received with a certificate that is not trusted
 
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModifiedRequestTest

public ModifiedRequestTest()
                    throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

testMovedElement

public void testMovedElement()
                      throws java.lang.Exception
Test that signs a SOAP body element "value". The SOAP request is then modified so that the signed "value" element is put in the header, and the value of the original element is changed. This test will fail as the request will contain multiple elements with the same wsu:Id.

Throws:
java.lang.Exception

testMovedElementChangedId

public void testMovedElementChangedId()
                               throws java.lang.Exception
Test that signs a SOAP body element "value". The SOAP request is then modified so that the signed "value" element is put in the header, and the value of the original element is changed. The wsu:Id value of the original element is also changed. Signature verification will pass, so we need to check the wsu:Id's.

Throws:
java.lang.Exception

testDuplicatedSignedSAMLAssertion

public void testDuplicatedSignedSAMLAssertion()
                                       throws java.lang.Exception
Test a duplicated signed SAML Assertion.

Throws:
java.lang.Exception

testDuplicatedSignedUsernameToken

public void testDuplicatedSignedUsernameToken()
                                       throws java.lang.Exception
Test a duplicated signed UsernameToken

Throws:
java.lang.Exception

testModifiedEncryptedDataStructure

public void testModifiedEncryptedDataStructure()
                                        throws java.lang.Exception
Test for when an EncryptedData structure is modified

Throws:
java.lang.Exception

testModifiedEncryptedDataCipherValue

public void testModifiedEncryptedDataCipherValue()
                                          throws java.lang.Exception
Test for when some EncryptedData CipherValue data is modified.

Throws:
java.lang.Exception

testModifiedEncryptedKeyCipherValue

public void testModifiedEncryptedKeyCipherValue()
                                         throws java.lang.Exception
Test for when some EncryptedKey CipherValue data is modified.

Throws:
java.lang.Exception

testModifiedSignatureReference

public void testModifiedSignatureReference()
                                    throws java.lang.Exception
Test for when an element that a Signature Reference points to is modified

Throws:
java.lang.Exception

testUntrustedSignature

public void testUntrustedSignature()
                            throws java.lang.Exception
Test for when a Signature is received with a certificate that is not trusted

Throws:
java.lang.Exception

testModifiedSignature

public void testModifiedSignature()
                           throws java.lang.Exception
Test for when the Signature element is modified

Throws:
java.lang.Exception


Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.