More refactoring
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ff0c73b1 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ff0c73b1 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ff0c73b1 Branch: refs/heads/master Commit: ff0c73b1f83fb5c6b7e5b364ac7e8be69d59a9fa Parents: 6869a8f Author: Colm O hEigeartaigh <[email protected]> Authored: Wed Aug 3 17:38:53 2016 +0100 Committer: Colm O hEigeartaigh <[email protected]> Committed: Wed Aug 3 17:38:53 2016 +0100 ---------------------------------------------------------------------- .../sts/asymmetric/AsymmetricBindingTest.java | 19 +-- .../cxf/systest/sts/bearer/BearerTest.java | 19 +-- .../cxf/systest/sts/deployment/STSServer.java | 8 +- .../systest/sts/deployment/StaxSTSServer.java | 8 +- .../IntermediaryTransformationCachingTest.java | 9 +- .../IntermediaryTransformationTest.java | 9 +- .../cxf/systest/sts/issuer/STSServer.java | 2 +- .../systest/sts/issueunit/IssueUnitTest.java | 9 +- .../apache/cxf/systest/sts/jaas/JAASTest.java | 9 +- .../systest/sts/stsclient/STSClientTest.java | 9 +- .../stsclient/STSTokenOutInterceptorTest.java | 13 +- .../sts/stsclient/STSTokenRetrieverTest.java | 13 +- .../sts/symmetric/SymmetricBindingTest.java | 19 +-- .../cxf/systest/sts/template/TemplateTest.java | 13 +- .../sts/transport/TransportBindingTest.java | 19 +-- .../UsernameActAsCachingTest.java | 9 +- .../sts/username_actas/UsernameActAsTest.java | 19 +-- .../UsernameOnBehalfOfCachingTest.java | 9 +- .../UsernameOnBehalfOfTest.java | 19 +-- .../sts/x509/X509AsymmetricBindingTest.java | 9 +- .../sts/x509/X509SymmetricBindingTest.java | 19 +-- .../systest/sts/deployment/cxf-encrypted-ut.xml | 59 -------- .../cxf/systest/sts/deployment/cxf-servlet.xml | 31 ---- .../cxf/systest/sts/deployment/cxf-sts.xml | 44 +++--- .../cxf/systest/sts/deployment/cxf-ut.xml | 33 +++++ .../cxf/systest/sts/deployment/cxf-x509.xml | 55 ++----- .../sts/deployment/stax-cxf-encrypted-ut.xml | 60 -------- .../systest/sts/deployment/stax-cxf-servlet.xml | 31 ---- .../cxf/systest/sts/deployment/stax-cxf-ut.xml | 34 +++++ .../systest/sts/deployment/stax-cxf-x509.xml | 48 ++----- .../sts/issuer/cxf-issuer-sts-transport.xml | 143 +++++++++++++++++++ .../systest/sts/issuer/cxf-sts-transport.xml | 143 ------------------- 32 files changed, 354 insertions(+), 589 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java index 8e6bb3a..f3082f1 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java @@ -84,18 +84,13 @@ public class AsymmetricBindingTest extends AbstractBusClientServerTestBase { // set this to false to fork launchServer(StaxServer.class, true) ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(StaxSTSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-ut.xml"); + assertTrue(launchServer(stsServer)); + + StaxSTSServer staxStsServer = new StaxSTSServer(); + staxStsServer.setContext("stax-cxf-ut.xml"); + assertTrue(launchServer(staxStsServer)); } @Parameters(name = "{0}") http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.java index f99d718..369e4ea 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.java @@ -76,18 +76,13 @@ public class BearerTest extends AbstractBusClientServerTestBase { // set this to false to fork launchServer(StaxServer.class, true) ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(StaxSTSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-transport.xml"); + assertTrue(launchServer(stsServer)); + + StaxSTSServer staxStsServer = new StaxSTSServer(); + staxStsServer.setContext("stax-cxf-transport.xml"); + assertTrue(launchServer(staxStsServer)); } @Parameters(name = "{0}") http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/STSServer.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/STSServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/STSServer.java index 64e10ba..4256ee3 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/STSServer.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/STSServer.java @@ -26,13 +26,15 @@ import org.apache.cxf.bus.spring.SpringBusFactory; import org.apache.cxf.testutil.common.AbstractBusTestServerBase; public class STSServer extends AbstractBusTestServerBase { + + private String context; public STSServer() { } protected void run() { - URL busFile = STSServer.class.getResource("cxf-servlet.xml"); + URL busFile = STSServer.class.getResource(context); Bus busLocal = new SpringBusFactory().createBus(busFile); BusFactory.setDefaultBus(busLocal); setBus(busLocal); @@ -43,4 +45,8 @@ public class STSServer extends AbstractBusTestServerBase { e.printStackTrace(); } } + + public void setContext(String context) { + this.context = context; + } } http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/StaxSTSServer.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/StaxSTSServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/StaxSTSServer.java index e3c2089..8ea95d6 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/StaxSTSServer.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/StaxSTSServer.java @@ -27,12 +27,14 @@ import org.apache.cxf.testutil.common.AbstractBusTestServerBase; public class StaxSTSServer extends AbstractBusTestServerBase { + private String context; + public StaxSTSServer() { } protected void run() { - URL busFile = StaxSTSServer.class.getResource("stax-cxf-servlet.xml"); + URL busFile = StaxSTSServer.class.getResource(context); Bus busLocal = new SpringBusFactory().createBus(busFile); BusFactory.setDefaultBus(busLocal); setBus(busLocal); @@ -43,4 +45,8 @@ public class StaxSTSServer extends AbstractBusTestServerBase { e.printStackTrace(); } } + + public void setContext(String context) { + this.context = context; + } } http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationCachingTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationCachingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationCachingTest.java index 8de807e..31a3958 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationCachingTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationCachingTest.java @@ -69,12 +69,9 @@ public class IntermediaryTransformationCachingTest extends AbstractBusClientServ // set this to false to fork launchServer(Server.class, true) ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-transport.xml"); + assertTrue(launchServer(stsServer)); } @org.junit.AfterClass http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationTest.java index ba3d46d..4e7bd78 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationTest.java @@ -68,12 +68,9 @@ public class IntermediaryTransformationTest extends AbstractBusClientServerTestB // set this to false to fork launchServer(Server.class, true) ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-transport.xml"); + assertTrue(launchServer(stsServer)); } @org.junit.AfterClass http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/STSServer.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/STSServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/STSServer.java index 9815fe0..9266418 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/STSServer.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/STSServer.java @@ -32,7 +32,7 @@ public class STSServer extends AbstractBusTestServerBase { } protected void run() { - URL busFile = STSServer.class.getResource("cxf-sts-transport.xml"); + URL busFile = STSServer.class.getResource("cxf-issuer-sts-transport.xml"); Bus busLocal = new SpringBusFactory().createBus(busFile); BusFactory.setDefaultBus(busLocal); setBus(busLocal); http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java index 12f7697..b8de1fb 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java @@ -94,12 +94,9 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase { @BeforeClass public static void startServers() throws Exception { - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-transport.xml"); + assertTrue(launchServer(stsServer)); } @org.junit.AfterClass http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/JAASTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/JAASTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/JAASTest.java index 80283f2..944e3fc 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/JAASTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/JAASTest.java @@ -68,13 +68,10 @@ public class JAASTest extends AbstractBusClientServerTestBase { // set this to false to fork launchServer(Server2.class, true) ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-transport.xml"); + assertTrue(launchServer(stsServer)); } @org.junit.AfterClass http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSClientTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSClientTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSClientTest.java index 37757c3..5ac75a5 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSClientTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSClientTest.java @@ -52,12 +52,9 @@ public class STSClientTest extends AbstractBusClientServerTestBase { // set this to false to fork launchServer(Server.class, true) ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-transport.xml"); + assertTrue(launchServer(stsServer)); } @org.junit.AfterClass http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSTokenOutInterceptorTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSTokenOutInterceptorTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSTokenOutInterceptorTest.java index 978f017..5a78f3e 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSTokenOutInterceptorTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSTokenOutInterceptorTest.java @@ -100,12 +100,13 @@ public class STSTokenOutInterceptorTest extends AbstractBusClientServerTestBase @BeforeClass public static void startServers() throws Exception { - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-transport.xml"); + assertTrue(launchServer(stsServer)); + + stsServer = new STSServer(); + stsServer.setContext("cxf-x509.xml"); + assertTrue(launchServer(stsServer)); } @AfterClass http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSTokenRetrieverTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSTokenRetrieverTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSTokenRetrieverTest.java index 549269d..a8ad265 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSTokenRetrieverTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSTokenRetrieverTest.java @@ -98,12 +98,13 @@ public class STSTokenRetrieverTest extends AbstractBusClientServerTestBase { @BeforeClass public static void startServers() throws Exception { - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-transport.xml"); + assertTrue(launchServer(stsServer)); + + stsServer = new STSServer(); + stsServer.setContext("cxf-x509.xml"); + assertTrue(launchServer(stsServer)); } @AfterClass http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java index f761de4..bbeb002 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java @@ -95,18 +95,13 @@ public class SymmetricBindingTest extends AbstractBusClientServerTestBase { // set this to false to fork launchServer(StaxServer.class, true) ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(StaxSTSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-ut.xml"); + assertTrue(launchServer(stsServer)); + + StaxSTSServer staxStsServer = new StaxSTSServer(); + staxStsServer.setContext("stax-cxf-ut.xml"); + assertTrue(launchServer(staxStsServer)); } @Parameters(name = "{0}") http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/TemplateTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/TemplateTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/TemplateTest.java index bc84260..39a59f3 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/TemplateTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/TemplateTest.java @@ -33,7 +33,6 @@ import org.apache.cxf.bus.spring.SpringBusFactory; import org.apache.cxf.systest.sts.common.SecurityTestUtil; import org.apache.cxf.systest.sts.common.TestParam; import org.apache.cxf.systest.sts.deployment.STSServer; -import org.apache.cxf.systest.sts.deployment.StaxSTSServer; import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase; import org.apache.cxf.ws.security.SecurityConstants; import org.apache.cxf.ws.security.trust.STSClient; @@ -50,9 +49,7 @@ import org.junit.runners.Parameterized.Parameters; public class TemplateTest extends AbstractBusClientServerTestBase { static final String STSPORT = allocatePort(STSServer.class); - static final String STAX_STSPORT = allocatePort(StaxSTSServer.class); static final String STSPORT2 = allocatePort(STSServer.class, 2); - static final String STAX_STSPORT2 = allocatePort(StaxSTSServer.class, 2); private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt"; private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService"); @@ -74,18 +71,16 @@ public class TemplateTest extends AbstractBusClientServerTestBase { // set this to false to fork launchServer(Server.class, true) ); + assertTrue( "Server failed to launch", // run the server in the same process // set this to false to fork launchServer(StaxServer.class, true) ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-transport.xml"); + assertTrue(launchServer(stsServer)); } @Parameters(name = "{0}") http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java index 735827a..4ea89ce 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java @@ -92,18 +92,13 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase { // set this to false to fork launchServer(StaxServer.class, true) ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(StaxSTSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-transport.xml"); + assertTrue(launchServer(stsServer)); + + StaxSTSServer staxStsServer = new StaxSTSServer(); + staxStsServer.setContext("stax-cxf-transport.xml"); + assertTrue(launchServer(staxStsServer)); } @Parameters(name = "{0}") http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsCachingTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsCachingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsCachingTest.java index c66eea4..c8d2f1c 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsCachingTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsCachingTest.java @@ -65,12 +65,9 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase { // set this to false to fork launchServer(Server.class, true) ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-x509.xml"); + assertTrue(launchServer(stsServer)); } @org.junit.AfterClass http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java index 2a429ba..705b63c 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java @@ -73,18 +73,13 @@ public class UsernameActAsTest extends AbstractBusClientServerTestBase { // set this to false to fork launchServer(Server2.class, true) ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(StaxSTSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-x509.xml"); + assertTrue(launchServer(stsServer)); + + StaxSTSServer staxStsServer = new StaxSTSServer(); + staxStsServer.setContext("stax-cxf-x509.xml"); + assertTrue(launchServer(staxStsServer)); } @Parameters(name = "{0}") http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfCachingTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfCachingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfCachingTest.java index 555c5a2..1f6dda2 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfCachingTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfCachingTest.java @@ -64,12 +64,9 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa // set this to false to fork launchServer(Server.class, true) ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-x509.xml"); + assertTrue(launchServer(stsServer)); } @org.junit.AfterClass http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java index 3e5f0ef..04b11b0 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java @@ -72,18 +72,13 @@ public class UsernameOnBehalfOfTest extends AbstractBusClientServerTestBase { // set this to false to fork launchServer(Server2.class, true) ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(StaxSTSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-x509.xml"); + assertTrue(launchServer(stsServer)); + + StaxSTSServer staxStsServer = new StaxSTSServer(); + staxStsServer.setContext("stax-cxf-x509.xml"); + assertTrue(launchServer(staxStsServer)); } @Parameters(name = "{0}") http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509AsymmetricBindingTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509AsymmetricBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509AsymmetricBindingTest.java index 344819f..86cf52f 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509AsymmetricBindingTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509AsymmetricBindingTest.java @@ -57,12 +57,9 @@ public class X509AsymmetricBindingTest extends AbstractBusClientServerTestBase { // set this to false to fork launchServer(AsymmetricServer.class, true) ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-x509.xml"); + assertTrue(launchServer(stsServer)); } @org.junit.AfterClass http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509SymmetricBindingTest.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509SymmetricBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509SymmetricBindingTest.java index 0e3878b..ea9fb89 100644 --- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509SymmetricBindingTest.java +++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509SymmetricBindingTest.java @@ -78,18 +78,13 @@ public class X509SymmetricBindingTest extends AbstractBusClientServerTestBase { // set this to false to fork launchServer(StaxServer.class, true) ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(STSServer.class, true) - ); - assertTrue( - "Server failed to launch", - // run the server in the same process - // set this to false to fork - launchServer(StaxSTSServer.class, true) - ); + STSServer stsServer = new STSServer(); + stsServer.setContext("cxf-x509.xml"); + assertTrue(launchServer(stsServer)); + + StaxSTSServer staxStsServer = new StaxSTSServer(); + staxStsServer.setContext("stax-cxf-x509.xml"); + assertTrue(launchServer(staxStsServer)); } @Parameters(name = "{0}") http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-encrypted-ut.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-encrypted-ut.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-encrypted-ut.xml deleted file mode 100644 index 8b5cdfb..0000000 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-encrypted-ut.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<beans xmlns="http://www.springframework.org/schema/beans" xmlns:cxf="http://cxf.apache.org/core" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:test="http://apache.org/hello_world_soap_http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> - <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> - <cxf:bus> - <cxf:features> - <cxf:logging/> - </cxf:features> - </cxf:bus> - <bean id="encryptedUtSTSProviderBean" class="org.apache.cxf.sts.provider.DefaultSecurityTokenServiceProvider"> - <property name="services" ref="encryptedUtService"/> - <property name="stsProperties" ref="encryptedUtSTSProperties"/> - <property name="encryptIssuedToken" value="true"/> - </bean> - <bean id="encryptedUtService" class="org.apache.cxf.sts.service.StaticService"> - <property name="endpoints" ref="encryptedUtEndpoints"/> - </bean> - <util:list id="encryptedUtEndpoints"> - <value>http://localhost:(\d)*/doubleit/services/doubleit(a)?symmetricsaml1encrypted - </value> - </util:list> - <bean id="encProperties" class="org.apache.cxf.sts.service.EncryptionProperties"> - <property name="encryptionAlgorithm" value="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/> - <property name="keyWrapAlgorithm" value="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/> - </bean> - <bean id="encryptedUtSTSProperties" class="org.apache.cxf.sts.StaticSTSProperties"> - <property name="signaturePropertiesFile" value="stsKeystore.properties"/> - <property name="signatureUsername" value="mystskey"/> - <property name="callbackHandlerClass" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/> - <property name="encryptionPropertiesFile" value="stsKeystore.properties"/> - <property name="encryptionProperties" ref="encProperties"/> - <property name="issuer" value="DoubleItSTSIssuer"/> - <property name="encryptionUsername" value="myservicekey"/> - </bean> - <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="EncryptedUTSTS" implementor="#encryptedUtSTSProviderBean" address="http://localhost:${testutil.ports.STSServer.2}/SecurityTokenService/UTEncrypted" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UTEncrypted_Port"> - <jaxws:properties> - <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/> - <entry key="security.signature.properties" value="stsKeystore.properties"/> - <entry key="security.signature.username" value="mystskey"/> - </jaxws:properties> - </jaxws:endpoint> -</beans> http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-servlet.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-servlet.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-servlet.xml deleted file mode 100644 index 92182f3..0000000 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-servlet.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<beans xmlns="http://www.springframework.org/schema/beans" xmlns:cxf="http://cxf.apache.org/core" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:test="http://apache.org/hello_world_soap_http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> - <import resource="classpath:META-INF/cxf/cxf.xml"/> - <import resource="cxf-transport.xml"/> - <import resource="cxf-ut.xml"/> - <import resource="cxf-encrypted-ut.xml"/> - <import resource="cxf-x509.xml"/> - <cxf:bus> - <cxf:features> - <cxf:logging/> - </cxf:features> - </cxf:bus> -</beans> http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml index 7a205a7..926dc01 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml @@ -35,41 +35,41 @@ <ref bean="utDelegationHandler"/> </util:list> - <bean id="transportIssueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation"> - <property name="tokenProviders" ref="transportTokenProviders"/> - <property name="tokenValidators" ref="transportTokenValidators"/> - <property name="services" ref="transportService"/> - <property name="stsProperties" ref="transportSTSProperties"/> + <bean id="issueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation"> + <property name="tokenProviders" ref="tokenProviders"/> + <property name="tokenValidators" ref="tokenValidators"/> + <property name="services" ref="service"/> + <property name="stsProperties" ref="stsProperties"/> <property name="delegationHandlers" ref="delegationHandlers"/> <property name="claimsManager" ref="claimsManager"/> </bean> - <bean id="transportValidateDelegate" class="org.apache.cxf.sts.operation.TokenValidateOperation"> - <property name="tokenValidators" ref="transportTokenValidators"/> - <property name="stsProperties" ref="transportSTSProperties"/> + <bean id="validateDelegate" class="org.apache.cxf.sts.operation.TokenValidateOperation"> + <property name="tokenValidators" ref="tokenValidators"/> + <property name="stsProperties" ref="stsProperties"/> </bean> - <bean id="transportUTTokenValidator" class="org.apache.cxf.sts.token.validator.UsernameTokenValidator"> + <bean id="utTokenValidator" class="org.apache.cxf.sts.token.validator.UsernameTokenValidator"> </bean> - <util:list id="transportTokenValidators"> - <ref bean="transportSamlTokenValidator"/> - <ref bean="transportUTTokenValidator"/> + <util:list id="tokenValidators"> + <ref bean="samlTokenValidator"/> + <ref bean="utTokenValidator"/> </util:list> - <util:list id="transportTokenProviders"> - <ref bean="transportSamlTokenProvider"/> + <util:list id="tokenProviders"> + <ref bean="samlTokenProvider"/> </util:list> - <bean id="transportSamlTokenValidator" class="org.apache.cxf.sts.token.validator.SAMLTokenValidator"> + <bean id="samlTokenValidator" class="org.apache.cxf.sts.token.validator.SAMLTokenValidator"> <property name="samlRealmCodec" ref="samlRealmCodec"/> </bean> - <bean id="transportSamlTokenProvider" class="org.apache.cxf.sts.token.provider.SAMLTokenProvider"> + <bean id="samlTokenProvider" class="org.apache.cxf.sts.token.provider.SAMLTokenProvider"> <property name="realmMap" ref="realms"/> </bean> <bean id="stsProviderBean" class="org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider"> - <property name="issueOperation" ref="transportIssueDelegate"/> - <property name="validateOperation" ref="transportValidateDelegate"/> + <property name="issueOperation" ref="issueDelegate"/> + <property name="validateOperation" ref="validateDelegate"/> </bean> - <bean id="transportService" class="org.apache.cxf.sts.service.StaticService"> - <property name="endpoints" ref="transportEndpoints"/> + <bean id="service" class="org.apache.cxf.sts.service.StaticService"> + <property name="endpoints" ref="endpoints"/> </bean> - <util:list id="transportEndpoints"> + <util:list id="endpoints"> <value>http(s)?://localhost:(\d)*/doubleit/services/doubleit.*</value> </util:list> <bean id="samlRealmCodec" class="org.apache.cxf.systest.sts.common.SAMLRealmCNCodec"/> @@ -83,7 +83,7 @@ <property name="type" value="FederatedIdentity"/> </bean> </util:list> - <bean id="transportSTSProperties" class="org.apache.cxf.sts.StaticSTSProperties"> + <bean id="stsProperties" class="org.apache.cxf.sts.StaticSTSProperties"> <property name="signaturePropertiesFile" value="stsKeystore.properties"/> <property name="signatureUsername" value="mystskey"/> <property name="callbackHandlerClass" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/> http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml index e4bf59b..659b9a2 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml @@ -33,4 +33,37 @@ <entry key="security.signature.properties" value="stsKeystore.properties"/> </jaxws:properties> </jaxws:endpoint> + + <bean id="encryptedUtSTSProviderBean" class="org.apache.cxf.sts.provider.DefaultSecurityTokenServiceProvider"> + <property name="services" ref="encryptedUtService"/> + <property name="stsProperties" ref="encryptedUtSTSProperties"/> + <property name="encryptIssuedToken" value="true"/> + </bean> + <bean id="encryptedUtService" class="org.apache.cxf.sts.service.StaticService"> + <property name="endpoints" ref="encryptedUtEndpoints"/> + </bean> + <util:list id="encryptedUtEndpoints"> + <value>http://localhost:(\d)*/doubleit/services/doubleit(a)?symmetricsaml1encrypted + </value> + </util:list> + <bean id="encProperties" class="org.apache.cxf.sts.service.EncryptionProperties"> + <property name="encryptionAlgorithm" value="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/> + <property name="keyWrapAlgorithm" value="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/> + </bean> + <bean id="encryptedUtSTSProperties" class="org.apache.cxf.sts.StaticSTSProperties"> + <property name="signaturePropertiesFile" value="stsKeystore.properties"/> + <property name="signatureUsername" value="mystskey"/> + <property name="callbackHandlerClass" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/> + <property name="encryptionPropertiesFile" value="stsKeystore.properties"/> + <property name="encryptionProperties" ref="encProperties"/> + <property name="issuer" value="DoubleItSTSIssuer"/> + <property name="encryptionUsername" value="myservicekey"/> + </bean> + <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="EncryptedUTSTS" implementor="#encryptedUtSTSProviderBean" address="http://localhost:${testutil.ports.STSServer.2}/SecurityTokenService/UTEncrypted" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UTEncrypted_Port"> + <jaxws:properties> + <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/> + <entry key="security.signature.properties" value="stsKeystore.properties"/> + <entry key="security.signature.username" value="mystskey"/> + </jaxws:properties> + </jaxws:endpoint> </beans> http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml index 3489adc..b73359c 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml @@ -24,55 +24,16 @@ <cxf:logging/> </cxf:features> </cxf:bus> - <bean id="x509STSProviderBean" class="org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider"> - <property name="issueOperation" ref="x509IssueDelegate"/> - <property name="validateOperation" ref="x509ValidateDelegate"/> - </bean> - <bean id="utDelegationHandler" class="org.apache.cxf.sts.token.delegation.UsernameTokenDelegationHandler"/> - <bean id="x509IssueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation"> - <property name="tokenProviders" ref="x509SamlTokenProvider"/> - <property name="tokenValidators" ref="x509TokenValidatorsOBO"/> - <property name="services" ref="x509Service"/> - <property name="stsProperties" ref="x509STSProperties"/> - <property name="delegationHandlers" ref="utDelegationHandler"/> - <property name="claimsManager" ref="claimsManager"/> - </bean> - <bean id="x509ValidateDelegate" class="org.apache.cxf.sts.operation.TokenValidateOperation"> - <property name="tokenValidators" ref="x509SamlTokenValidator"/> - <property name="stsProperties" ref="x509STSProperties"/> - </bean> - <bean id="x509SamlTokenProvider" class="org.apache.cxf.sts.token.provider.SAMLTokenProvider"> - </bean> - <bean id="x509SamlTokenValidator" class="org.apache.cxf.sts.token.validator.SAMLTokenValidator"> - </bean> - <util:list id="x509TokenValidatorsOBO"> - <ref bean="x509SamlTokenValidator"/> + + <import resource="cxf-sts.xml" /> + + <!-- Override UsernameTokenValidator --> + <util:list id="tokenValidators"> + <ref bean="samlTokenValidator"/> <bean class="org.apache.cxf.systest.sts.username_onbehalfof.UsernameTokenValidator"/> </util:list> - <bean id="claimsManager" class="org.apache.cxf.sts.claims.ClaimsManager"> - <property name="claimHandlers" ref="customClaimsHandler"/> - </bean> - <bean id="customClaimsHandler" class="org.apache.cxf.systest.sts.deployment.CustomClaimsHandler"> - </bean> - - <bean id="x509Service" class="org.apache.cxf.sts.service.StaticService"> - <property name="endpoints" ref="x509Endpoints"/> - </bean> - <util:list id="x509Endpoints"> - <value>http://localhost:(\d)*/doubleit/services/doubleitsymmetric.* - </value> - <value>http://localhost:(\d)*/doubleit/services/doubleitasymmetric.* - </value> - </util:list> - <bean id="x509STSProperties" class="org.apache.cxf.sts.StaticSTSProperties"> - <property name="signaturePropertiesFile" value="stsKeystore.properties"/> - <property name="signatureUsername" value="mystskey"/> - <property name="callbackHandlerClass" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/> - <property name="encryptionPropertiesFile" value="stsKeystore.properties"/> - <property name="issuer" value="DoubleItSTSIssuer"/> - <property name="encryptionUsername" value="myservicekey"/> - </bean> - <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="X509STS" implementor="#x509STSProviderBean" address="http://localhost:${testutil.ports.STSServer.2}/SecurityTokenService/X509" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:X509_Port"> + + <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="X509STS" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.STSServer.2}/SecurityTokenService/X509" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:X509_Port"> <jaxws:properties> <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/> <entry key="security.signature.properties" value="stsKeystore.properties"/> http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-encrypted-ut.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-encrypted-ut.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-encrypted-ut.xml deleted file mode 100644 index 8f9d848..0000000 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-encrypted-ut.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<beans xmlns="http://www.springframework.org/schema/beans" xmlns:cxf="http://cxf.apache.org/core" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:test="http://apache.org/hello_world_soap_http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> - <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> - <cxf:bus> - <cxf:features> - <cxf:logging/> - </cxf:features> - </cxf:bus> - <bean id="encryptedUtSTSProviderBean" class="org.apache.cxf.sts.provider.DefaultSecurityTokenServiceProvider"> - <property name="services" ref="encryptedUtService"/> - <property name="stsProperties" ref="encryptedUtSTSProperties"/> - <property name="encryptIssuedToken" value="true"/> - </bean> - <bean id="encryptedUtService" class="org.apache.cxf.sts.service.StaticService"> - <property name="endpoints" ref="encryptedUtEndpoints"/> - </bean> - <util:list id="encryptedUtEndpoints"> - <value>http://localhost:(\d)*/doubleit/services/doubleit(a)?symmetricsaml1encrypted - </value> - </util:list> - <bean id="encProperties" class="org.apache.cxf.sts.service.EncryptionProperties"> - <property name="encryptionAlgorithm" value="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/> - <property name="keyWrapAlgorithm" value="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/> - </bean> - <bean id="encryptedUtSTSProperties" class="org.apache.cxf.sts.StaticSTSProperties"> - <property name="signaturePropertiesFile" value="stsKeystore.properties"/> - <property name="signatureUsername" value="mystskey"/> - <property name="callbackHandlerClass" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/> - <property name="encryptionPropertiesFile" value="stsKeystore.properties"/> - <property name="encryptionProperties" ref="encProperties"/> - <property name="issuer" value="DoubleItSTSIssuer"/> - <property name="encryptionUsername" value="myservicekey"/> - </bean> - <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="EncryptedUTSTS" implementor="#encryptedUtSTSProviderBean" address="http://localhost:${testutil.ports.StaxSTSServer.2}/SecurityTokenService/UTEncrypted" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UTEncrypted_Port"> - <jaxws:properties> - <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/> - <entry key="security.signature.properties" value="stsKeystore.properties"/> - <entry key="security.signature.username" value="mystskey"/> - <entry key="ws-security.enable.streaming" value="true"/> - </jaxws:properties> - </jaxws:endpoint> -</beans> http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-servlet.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-servlet.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-servlet.xml deleted file mode 100644 index 2644883..0000000 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-servlet.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<beans xmlns="http://www.springframework.org/schema/beans" xmlns:cxf="http://cxf.apache.org/core" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:test="http://apache.org/hello_world_soap_http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> - <import resource="classpath:META-INF/cxf/cxf.xml"/> - <import resource="stax-cxf-transport.xml"/> - <import resource="stax-cxf-ut.xml"/> - <import resource="stax-cxf-encrypted-ut.xml"/> - <import resource="stax-cxf-x509.xml"/> - <cxf:bus> - <cxf:features> - <cxf:logging/> - </cxf:features> - </cxf:bus> -</beans> http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml index 92d34dc..20420ef 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml @@ -34,4 +34,38 @@ <entry key="ws-security.enable.streaming" value="true"/> </jaxws:properties> </jaxws:endpoint> + + <bean id="encryptedUtSTSProviderBean" class="org.apache.cxf.sts.provider.DefaultSecurityTokenServiceProvider"> + <property name="services" ref="encryptedUtService"/> + <property name="stsProperties" ref="encryptedUtSTSProperties"/> + <property name="encryptIssuedToken" value="true"/> + </bean> + <bean id="encryptedUtService" class="org.apache.cxf.sts.service.StaticService"> + <property name="endpoints" ref="encryptedUtEndpoints"/> + </bean> + <util:list id="encryptedUtEndpoints"> + <value>http://localhost:(\d)*/doubleit/services/doubleit(a)?symmetricsaml1encrypted + </value> + </util:list> + <bean id="encProperties" class="org.apache.cxf.sts.service.EncryptionProperties"> + <property name="encryptionAlgorithm" value="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/> + <property name="keyWrapAlgorithm" value="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/> + </bean> + <bean id="encryptedUtSTSProperties" class="org.apache.cxf.sts.StaticSTSProperties"> + <property name="signaturePropertiesFile" value="stsKeystore.properties"/> + <property name="signatureUsername" value="mystskey"/> + <property name="callbackHandlerClass" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/> + <property name="encryptionPropertiesFile" value="stsKeystore.properties"/> + <property name="encryptionProperties" ref="encProperties"/> + <property name="issuer" value="DoubleItSTSIssuer"/> + <property name="encryptionUsername" value="myservicekey"/> + </bean> + <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="EncryptedUTSTS" implementor="#encryptedUtSTSProviderBean" address="http://localhost:${testutil.ports.StaxSTSServer.2}/SecurityTokenService/UTEncrypted" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UTEncrypted_Port"> + <jaxws:properties> + <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/> + <entry key="security.signature.properties" value="stsKeystore.properties"/> + <entry key="security.signature.username" value="mystskey"/> + <entry key="ws-security.enable.streaming" value="true"/> + </jaxws:properties> + </jaxws:endpoint> </beans> http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml index db83d75..7a5a3ab 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml @@ -24,48 +24,16 @@ <cxf:logging/> </cxf:features> </cxf:bus> - <bean id="x509STSProviderBean" class="org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider"> - <property name="issueOperation" ref="x509IssueDelegate"/> - <property name="validateOperation" ref="x509ValidateDelegate"/> - </bean> - <bean id="utDelegationHandler" class="org.apache.cxf.sts.token.delegation.UsernameTokenDelegationHandler"/> - <bean id="x509IssueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation"> - <property name="tokenProviders" ref="x509SamlTokenProvider"/> - <property name="tokenValidators" ref="x509TokenValidatorsOBO"/> - <property name="services" ref="x509Service"/> - <property name="stsProperties" ref="x509STSProperties"/> - <property name="delegationHandlers" ref="utDelegationHandler"/> - </bean> - <bean id="x509ValidateDelegate" class="org.apache.cxf.sts.operation.TokenValidateOperation"> - <property name="tokenValidators" ref="x509SamlTokenValidator"/> - <property name="stsProperties" ref="x509STSProperties"/> - </bean> - <bean id="x509SamlTokenProvider" class="org.apache.cxf.sts.token.provider.SAMLTokenProvider"> - </bean> - <bean id="x509SamlTokenValidator" class="org.apache.cxf.sts.token.validator.SAMLTokenValidator"> - </bean> - <util:list id="x509TokenValidatorsOBO"> - <ref bean="x509SamlTokenValidator"/> + + <import resource="cxf-sts.xml" /> + + <!-- Override UsernameTokenValidator --> + <util:list id="tokenValidators"> + <ref bean="samlTokenValidator"/> <bean class="org.apache.cxf.systest.sts.username_onbehalfof.UsernameTokenValidator"/> </util:list> - <bean id="x509Service" class="org.apache.cxf.sts.service.StaticService"> - <property name="endpoints" ref="x509Endpoints"/> - </bean> - <util:list id="x509Endpoints"> - <value>http://localhost:(\d)*/doubleit/services/doubleitsymmetric.* - </value> - <value>http://localhost:(\d)*/doubleit/services/doubleitasymmetric.* - </value> - </util:list> - <bean id="x509STSProperties" class="org.apache.cxf.sts.StaticSTSProperties"> - <property name="signaturePropertiesFile" value="stsKeystore.properties"/> - <property name="signatureUsername" value="mystskey"/> - <property name="callbackHandlerClass" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/> - <property name="encryptionPropertiesFile" value="stsKeystore.properties"/> - <property name="issuer" value="DoubleItSTSIssuer"/> - <property name="encryptionUsername" value="myservicekey"/> - </bean> - <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="X509STS" implementor="#x509STSProviderBean" address="http://localhost:${testutil.ports.StaxSTSServer.2}/SecurityTokenService/X509" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:X509_Port"> + + <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="X509STS" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.StaxSTSServer.2}/SecurityTokenService/X509" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:X509_Port"> <jaxws:properties> <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/> <entry key="security.signature.properties" value="stsKeystore.properties"/> http://git-wip-us.apache.org/repos/asf/cxf/blob/ff0c73b1/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-issuer-sts-transport.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-issuer-sts-transport.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-issuer-sts-transport.xml new file mode 100644 index 0000000..9d69637 --- /dev/null +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-issuer-sts-transport.xml @@ -0,0 +1,143 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<beans xmlns="http://www.springframework.org/schema/beans" xmlns:cxf="http://cxf.apache.org/core" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" xmlns:test="http://apache.org/hello_world_soap_http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/sc hemas/configuration/http-jetty.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> + <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> + <cxf:bus> + <cxf:features> + <cxf:logging/> + </cxf:features> + </cxf:bus> + <bean id="hokDelegationHandler" class="org.apache.cxf.sts.token.delegation.HOKDelegationHandler"/> + <bean id="transportSTSProviderBean2" class="org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider"> + <property name="issueOperation" ref="transportIssueDelegate2"/> + <property name="validateOperation" ref="transportValidateDelegate2"/> + </bean> + <bean id="transportIssueDelegate2" class="org.apache.cxf.sts.operation.TokenIssueOperation"> + <property name="tokenProviders" ref="transportTokenProviders2"/> + <property name="tokenValidators" ref="transportTokenValidators"/> + <property name="services" ref="transportService"/> + <property name="stsProperties" ref="transportSTSProperties"/> + <property name="delegationHandlers" ref="hokDelegationHandler"/> + </bean> + <bean id="transportValidateDelegate2" class="org.apache.cxf.sts.operation.TokenValidateOperation"> + <property name="tokenValidators" ref="transportTokenValidators2"/> + <property name="stsProperties" ref="transportSTSProperties"/> + </bean> + <util:list id="transportTokenValidators2"> + <ref bean="transportSamlTokenValidator2"/> + </util:list> + <util:list id="transportTokenProviders2"> + <ref bean="transportSamlTokenProvider2"/> + </util:list> + <bean id="transportSamlTokenValidator2" class="org.apache.cxf.sts.token.validator.SAMLTokenValidator"> + <property name="samlRealmCodec" ref="samlRealmCodec"/> + </bean> + <bean id="transportSamlTokenProvider2" class="org.apache.cxf.sts.token.provider.SAMLTokenProvider"> + <property name="realmMap" ref="realms"/> + </bean> + <bean id="transportIssueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation"> + <property name="tokenProviders" ref="transportTokenProviders"/> + <property name="tokenValidators" ref="transportTokenValidators"/> + <property name="services" ref="transportService"/> + <property name="stsProperties" ref="transportSTSProperties"/> + <property name="delegationHandlers" ref="hokDelegationHandler"/> + </bean> + <bean id="transportValidateDelegate" class="org.apache.cxf.sts.operation.TokenValidateOperation"> + <property name="tokenValidators" ref="transportTokenValidators"/> + <property name="stsProperties" ref="transportSTSProperties"/> + </bean> + <util:list id="transportTokenValidators"> + <ref bean="transportSamlTokenValidator"/> + </util:list> + <util:list id="transportTokenProviders"> + <ref bean="transportSamlTokenProvider"/> + </util:list> + <bean id="transportSamlTokenValidator" class="org.apache.cxf.sts.token.validator.SAMLTokenValidator"> + </bean> + <bean id="transportSamlTokenProvider" class="org.apache.cxf.sts.token.provider.SAMLTokenProvider"> + </bean> + <bean id="transportSTSProviderBean" class="org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider"> + <property name="issueOperation" ref="transportIssueDelegate"/> + <property name="validateOperation" ref="transportValidateDelegate"/> + </bean> + <bean id="transportService" class="org.apache.cxf.sts.service.StaticService"> + <property name="endpoints" ref="transportEndpoints"/> + </bean> + <util:list id="transportEndpoints"> + <value>https://localhost:(\d)*/doubleit/services/doubleittransport.* + </value> + </util:list> + <bean id="realmA" class="org.apache.cxf.sts.token.realm.RealmProperties"> + <property name="issuer" value="a-issuer"/> + </bean> + <bean id="realmB" class="org.apache.cxf.sts.token.realm.RealmProperties"> + <property name="issuer" value="b-issuer"/> + </bean> + <util:map id="realms"> + <entry key="a-issuer" value-ref="realmA"/> + <entry key="b-issuer" value-ref="realmB"/> + </util:map> + <bean id="samlRealmCodec" class="org.apache.cxf.systest.sts.common.SAMLRealmCNCodec"/> + <bean id="customRealmParser" class="org.apache.cxf.systest.sts.common.UriRealmParser"/> + <bean id="identityMapper" class="org.apache.cxf.systest.sts.common.CustomIdentityMapper"/> + <util:list id="relationships"> + <bean class="org.apache.cxf.sts.token.realm.Relationship"> + <property name="sourceRealm" value="a-issuer"/> + <property name="targetRealm" value="b-issuer"/> + <property name="identityMapper" ref="identityMapper"/> + <property name="type" value="FederatedIdentity"/> + </bean> + </util:list> + <bean id="transportSTSProperties" class="org.apache.cxf.sts.StaticSTSProperties"> + <property name="signaturePropertiesFile" value="stsKeystore.properties"/> + <property name="signatureUsername" value="mystskey"/> + <property name="callbackHandlerClass" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/> + <property name="encryptionPropertiesFile" value="stsKeystore.properties"/> + <property name="issuer" value="DoubleItSTSIssuer"/> + <property name="encryptionUsername" value="myservicekey"/> + <property name="realmParser" ref="customRealmParser"/> + <property name="relationships" ref="relationships"/> + <property name="samlRealmCodec" ref="samlRealmCodec"/> + </bean> + <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="transportSTS" implementor="#transportSTSProviderBean" address="https://localhost:30101/SecurityTokenService/Transport" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/issuer/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Port" depends-on="ClientAuthHttpsSettings"> + <jaxws:properties> + <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/> + </jaxws:properties> + </jaxws:endpoint> + <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="transportSTSSoap12" implementor="#transportSTSProviderBean" address="https://localhost:30101/SecurityTokenService/TransportSoap12" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/issuer/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Soap12_Port" depends-on="ClientAuthHttpsSettings"> + <jaxws:properties> + <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/> + </jaxws:properties> + </jaxws:endpoint> + + <httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf"> + <httpj:engine port="30101"> + <httpj:tlsServerParameters> + <sec:keyManagers keyPassword="skpass"> + <sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/> + </sec:keyManagers> + <sec:trustManagers> + <sec:keyStore type="jks" password="stsspass" resource="keys/stsstore.jks"/> + </sec:trustManagers> + <sec:clientAuthentication want="false" required="false"/> + </httpj:tlsServerParameters> + </httpj:engine> + </httpj:engine-factory> +</beans>
