Package org.apache.wss4j.dom.message
Class UTDerivedKeyTest
- java.lang.Object
-
- org.apache.wss4j.dom.message.UTDerivedKeyTest
-
public class UTDerivedKeyTest extends Object
WS-Security Test Case for UsernameToken Key Derivation, as defined in the UsernameTokenProfile 1.1 specification. The derived keys are used to encrypt and sign, as per wsc:DerivedKeyToken.
-
-
Constructor Summary
Constructors Constructor Description UTDerivedKeyTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testBadValueType()
Test using a UsernameToken derived key for encrypting a SOAP body.void
testDerivedKeyBadUserEncryption()
Test using a UsernameToken derived key for encrypting a SOAP body.void
testDerivedKeyBadUserSignature()
Test using a UsernameToken derived key for signing a SOAP body.void
testDerivedKeyChangedEncryption()
Test using a UsernameToken derived key for encrypting a SOAP body.void
testDerivedKeyChangedSignature()
Test using a UsernameToken derived key for signing a SOAP body.void
testDerivedKeyEncryption()
Test using a UsernameToken derived key for encrypting a SOAP bodyvoid
testDerivedKeyEncryptionWithEncodedPassword()
Test using a UsernameToken derived key for encrypting a SOAP bodyvoid
testDerivedKeySignature()
Test using a UsernameToken derived key for signing a SOAP bodyvoid
testDerivedKeySignatureWithEncodedPassword()
Test using a UsernameToken derived key for signing a SOAP bodyvoid
testDerivedKeyWithEncodedPasswordBaseline()
Test for encoded passwords.void
testKeyIdentifier()
Test using a UsernameToken derived key for encrypting a SOAP body.void
testLowIterationEncryption()
Unit test for creating a Username Token with an iteration value < 1000 that is used for deriving a key for encryption.void
testNoIterationEncryption()
Unit test for creating a Username Token with no iteration element that is used for deriving a key for encryption.void
testNoSaltEncryption()
Unit test for creating a Username Token with no salt element that is used for deriving a key for encryption.void
testUsernameTokenUnit()
Unit test for the UsernameToken derived key functionality
-
-
-
Method Detail
-
testUsernameTokenUnit
@Test public void testUsernameTokenUnit() throws Exception
Unit test for the UsernameToken derived key functionality- Throws:
Exception
-
testDerivedKeyWithEncodedPasswordBaseline
@Test public void testDerivedKeyWithEncodedPasswordBaseline() throws Exception
Test for encoded passwords.- Throws:
Exception
-
testDerivedKeyEncryption
@Test public void testDerivedKeyEncryption() throws Exception
Test using a UsernameToken derived key for encrypting a SOAP body- Throws:
Exception
-
testDerivedKeyEncryptionWithEncodedPassword
@Test public void testDerivedKeyEncryptionWithEncodedPassword() throws Exception
Test using a UsernameToken derived key for encrypting a SOAP body- Throws:
Exception
-
testDerivedKeyChangedEncryption
@Test public void testDerivedKeyChangedEncryption() throws Exception
Test using a UsernameToken derived key for encrypting a SOAP body. In this test the derived key is modified before encryption, and so decryption should fail.- Throws:
Exception
-
testDerivedKeyBadUserEncryption
@Test public void testDerivedKeyBadUserEncryption() throws Exception
Test using a UsernameToken derived key for encrypting a SOAP body. In this test the user is "colm" rather than "bob", and so decryption should fail.- Throws:
Exception
-
testDerivedKeySignature
@Test public void testDerivedKeySignature() throws Exception
Test using a UsernameToken derived key for signing a SOAP body- Throws:
Exception
-
testDerivedKeySignatureWithEncodedPassword
@Test public void testDerivedKeySignatureWithEncodedPassword() throws Exception
Test using a UsernameToken derived key for signing a SOAP body- Throws:
Exception
-
testDerivedKeyChangedSignature
@Test public void testDerivedKeyChangedSignature() throws Exception
Test using a UsernameToken derived key for signing a SOAP body. In this test the derived key is modified before signature, and so signature verification should fail.- Throws:
Exception
-
testDerivedKeyBadUserSignature
@Test public void testDerivedKeyBadUserSignature() throws Exception
Test using a UsernameToken derived key for signing a SOAP body. In this test the user is "colm" rather than "bob", and so signature verification should fail.- Throws:
Exception
-
testNoSaltEncryption
@Test public void testNoSaltEncryption() throws Exception
Unit test for creating a Username Token with no salt element that is used for deriving a key for encryption.- Throws:
Exception
-
testNoIterationEncryption
@Test public void testNoIterationEncryption() throws Exception
Unit test for creating a Username Token with no iteration element that is used for deriving a key for encryption.- Throws:
Exception
-
testLowIterationEncryption
@Test public void testLowIterationEncryption() throws Exception
Unit test for creating a Username Token with an iteration value < 1000 that is used for deriving a key for encryption.- Throws:
Exception
-
testBadValueType
@Test public void testBadValueType() throws Exception
Test using a UsernameToken derived key for encrypting a SOAP body. The Reference to the UsernameToken contains a non-standard value type, which is rejected when the corresponding BSP rule is turned on.- Throws:
Exception
-
-