Author: coheigea
Date: Mon Mar 4 17:23:48 2013
New Revision: 1452411
URL: http://svn.apache.org/r1452411
Log:
Merged revisions 1452410 via git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1452410 | coheigea | 2013-03-04 17:22:15 +0000 (Mon, 04 Mar 2013) | 2 lines
Separating client + server side caching tests
........
Added:
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingServer.java
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/ServerCachingTest.java
- copied, changed from r1452390,
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml
- copied, changed from r1452390,
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml
Modified:
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml
Added:
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingServer.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingServer.java?rev=1452411&view=auto
==============================================================================
---
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingServer.java
(added)
+++
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingServer.java
Mon Mar 4 17:23:48 2013
@@ -0,0 +1,46 @@
+/**
+ * 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.
+ */
+package org.apache.cxf.systest.sts.caching;
+
+import java.net.URL;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+
+public class CachingServer extends AbstractBusTestServerBase {
+
+ public CachingServer() {
+
+ }
+
+ protected void run() {
+ URL busFile =
CachingServer.class.getResource("cxf-caching-service.xml");
+ Bus busLocal = new SpringBusFactory().createBus(busFile);
+ BusFactory.setDefaultBus(busLocal);
+ setBus(busLocal);
+
+ try {
+ new CachingServer();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
Modified:
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java?rev=1452411&r1=1452410&r2=1452411&view=diff
==============================================================================
---
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
(original)
+++
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
Mon Mar 4 17:23:48 2013
@@ -19,16 +19,12 @@
package org.apache.cxf.systest.sts.caching;
import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
import javax.xml.ws.soap.SOAPFaultException;
-import org.w3c.dom.Element;
-
import org.apache.cxf.Bus;
import org.apache.cxf.BusException;
import org.apache.cxf.bus.spring.SpringBusFactory;
@@ -40,10 +36,7 @@ import org.apache.cxf.systest.sts.common
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
-import org.apache.cxf.ws.security.tokenstore.SecurityToken;
-import org.apache.cxf.ws.security.tokenstore.TokenStore;
import org.apache.cxf.ws.security.trust.STSClient;
-
import org.example.contract.doubleit.DoubleItPortType;
import org.junit.BeforeClass;
@@ -57,16 +50,7 @@ public class CachingTest extends Abstrac
private static final String NAMESPACE =
"http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE,
"DoubleItService");
- private static final String SAML1_TOKEN_TYPE =
-
"http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1";
- private static final String PUBLIC_KEY_KEYTYPE =
- "http://docs.oasis-open.org/ws-sx/ws-trust/200512/PublicKey";
-
private static final String PORT = allocatePort(Server.class);
- private static final String PORT2 = allocatePort(Server.class, 2);
-
- private static final String DEFAULT_ADDRESS =
- "https://localhost:" + PORT +
"/doubleit/services/doubleittransportsaml1alternative";
@BeforeClass
public static void startServers() throws Exception {
@@ -175,167 +159,6 @@ public class CachingTest extends Abstrac
bus.shutdown(true);
}
- @org.junit.Test
- public void testServerSideSAMLTokenCaching() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = CachingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- SpringBusFactory.setDefaultBus(bus);
- SpringBusFactory.setThreadDefaultBus(bus);
-
- URL wsdl = CachingTest.class.getResource("DoubleIt.wsdl");
- Service service = Service.create(wsdl, SERVICE_QNAME);
- QName portQName = new QName(NAMESPACE,
"DoubleItTransportSAML1AlternativePort");
- DoubleItPortType port =
- service.getPort(portQName, DoubleItPortType.class);
- updateAddressPort(port, PORT);
-
- // Make an initial successful invocation
- doubleIt(port, 25);
-
- // Store the SAML Assertion that was obtained from the STS
- Client client = ClientProxy.getClient(port);
- Endpoint ep = client.getEndpoint();
- String id = (String)ep.get(SecurityConstants.TOKEN_ID);
- TokenStore store =
(TokenStore)ep.getEndpointInfo().getProperty(TokenStore.class.getName());
- SecurityToken tok = store.getToken(id);
- assertNotNull(tok);
- Element storedToken = tok.getToken();
-
- // Get another security token by invoking on the STS directly and save
it on the client port
- SecurityToken token =
- requestSecurityToken(SAML1_TOKEN_TYPE, PUBLIC_KEY_KEYTYPE, bus,
DEFAULT_ADDRESS);
- assertNotNull(token);
- tok.setToken(token.getToken());
-
- // Try another invocation - this will fail as the STSClient on the
server side is disabled
- // after the first invocation
- try {
- doubleIt(port, 30);
- fail("Failure expected as the STSClient on the server side is
null");
- } catch (Throwable ex) {
- // expected
- }
- // Try again using the original SAML token - this should work as it
should be cached by the service
- tok.setToken(storedToken);
- doubleIt(port, 35);
-
- ((java.io.Closeable)port).close();
- bus.shutdown(true);
- }
-
- @org.junit.Test
- public void testServerSideUsernameTokenCaching() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = CachingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- SpringBusFactory.setDefaultBus(bus);
- SpringBusFactory.setThreadDefaultBus(bus);
-
- URL wsdl = CachingTest.class.getResource("DoubleIt.wsdl");
- Service service = Service.create(wsdl, SERVICE_QNAME);
- QName portQName = new QName(NAMESPACE, "DoubleItTransportUTPort");
- DoubleItPortType transportUTPort =
- service.getPort(portQName, DoubleItPortType.class);
- updateAddressPort(transportUTPort, PORT);
-
- // Make an initial successful invocation
- doubleIt(transportUTPort, 25);
-
- BindingProvider p = (BindingProvider)transportUTPort;
- try {
- // The STSClient on the server side is disabled after the first
invocation
- p.getRequestContext().put(SecurityConstants.USERNAME, "bob");
- doubleIt(transportUTPort, 30);
- fail("Failure expected as the STSClient on the server side is
null");
- } catch (Exception ex) {
- // expected
- }
-
- // This will pass as the UsernameToken should be cached
- p.getRequestContext().put(SecurityConstants.USERNAME, "alice");
- doubleIt(transportUTPort, 35);
-
- ((java.io.Closeable)transportUTPort).close();
- bus.shutdown(true);
- }
-
- @org.junit.Test
- public void testServerSideBinarySecurityTokenCaching() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = CachingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- SpringBusFactory.setDefaultBus(bus);
- SpringBusFactory.setThreadDefaultBus(bus);
-
- URL wsdl = CachingTest.class.getResource("DoubleIt.wsdl");
- Service service = Service.create(wsdl, SERVICE_QNAME);
- QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricBSTPort");
- DoubleItPortType bstPort =
- service.getPort(portQName, DoubleItPortType.class);
- updateAddressPort(bstPort, PORT2);
-
- // Make an initial successful invocation
- doubleIt(bstPort, 25);
-
- BindingProvider p = (BindingProvider)bstPort;
- try {
- // The STSClient on the server side is disabled after the first
invocation
- p.getRequestContext().put(SecurityConstants.SIGNATURE_USERNAME,
"myservicekey");
- p.getRequestContext().put(SecurityConstants.SIGNATURE_PROPERTIES,
"serviceKeystore.properties");
- doubleIt(bstPort, 30);
- fail("Failure expected as the STSClient on the server side is
null");
- } catch (Exception ex) {
- // expected
- }
-
- // This will pass as the BinarySecurityToken should be cached
- p.getRequestContext().put(SecurityConstants.SIGNATURE_USERNAME,
"myclientkey");
- p.getRequestContext().put(SecurityConstants.SIGNATURE_PROPERTIES,
"clientKeystore.properties");
- doubleIt(bstPort, 35);
-
- ((java.io.Closeable)bstPort).close();
- bus.shutdown(true);
- }
-
- private SecurityToken requestSecurityToken(
- String tokenType,
- String keyType,
- Bus bus,
- String endpointAddress
- ) throws Exception {
- STSClient stsClient = new STSClient(bus);
- stsClient.setWsdlLocation("https://localhost:" + STSPORT +
"/SecurityTokenService/Transport?wsdl");
-
stsClient.setServiceName("{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService");
-
stsClient.setEndpointName("{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Transport_Port");
-
- Map<String, Object> properties = new HashMap<String, Object>();
- properties.put(SecurityConstants.USERNAME, "alice");
- properties.put(
- SecurityConstants.CALLBACK_HANDLER,
- "org.apache.cxf.systest.sts.common.CommonCallbackHandler"
- );
-
- if (PUBLIC_KEY_KEYTYPE.equals(keyType)) {
- properties.put(SecurityConstants.STS_TOKEN_USERNAME,
"myservicekey");
- properties.put(SecurityConstants.STS_TOKEN_PROPERTIES,
"serviceKeystore.properties");
- stsClient.setUseCertificateForConfirmationKeyInfo(true);
- }
-
- stsClient.setProperties(properties);
- stsClient.setTokenType(tokenType);
- stsClient.setKeyType(keyType);
-
stsClient.setAddressingNamespace("http://www.w3.org/2005/08/addressing");
-
- return stsClient.requestSecurityToken(endpointAddress);
- }
-
private void clearSTSClient(BindingProvider p) throws BusException,
EndpointException {
STSClient stsClient =
(STSClient)p.getRequestContext().get(SecurityConstants.STS_CLIENT);
stsClient.getClient().destroy();
Copied:
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/ServerCachingTest.java
(from r1452390,
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java)
URL:
http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/ServerCachingTest.java?p2=cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/ServerCachingTest.java&p1=cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java&r1=1452390&r2=1452411&rev=1452411&view=diff
==============================================================================
---
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
(original)
+++
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/ServerCachingTest.java
Mon Mar 4 17:23:48 2013
@@ -25,16 +25,13 @@ import java.util.Map;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
-import javax.xml.ws.soap.SOAPFaultException;
import org.w3c.dom.Element;
import org.apache.cxf.Bus;
-import org.apache.cxf.BusException;
import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.endpoint.Endpoint;
-import org.apache.cxf.endpoint.EndpointException;
import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.deployment.STSServer;
@@ -43,14 +40,13 @@ import org.apache.cxf.ws.security.Securi
import org.apache.cxf.ws.security.tokenstore.SecurityToken;
import org.apache.cxf.ws.security.tokenstore.TokenStore;
import org.apache.cxf.ws.security.trust.STSClient;
-
import org.example.contract.doubleit.DoubleItPortType;
import org.junit.BeforeClass;
/**
- * Test various Caching properties relating to the STSClient and also at the
validation side.
+ * Test various server Caching properties
*/
-public class CachingTest extends AbstractBusClientServerTestBase {
+public class ServerCachingTest extends AbstractBusClientServerTestBase {
static final String STSPORT = allocatePort(STSServer.class);
@@ -62,8 +58,8 @@ public class CachingTest extends Abstrac
private static final String PUBLIC_KEY_KEYTYPE =
"http://docs.oasis-open.org/ws-sx/ws-trust/200512/PublicKey";
- private static final String PORT = allocatePort(Server.class);
- private static final String PORT2 = allocatePort(Server.class, 2);
+ private static final String PORT = allocatePort(CachingServer.class);
+ private static final String PORT2 = allocatePort(CachingServer.class, 2);
private static final String DEFAULT_ADDRESS =
"https://localhost:" + PORT +
"/doubleit/services/doubleittransportsaml1alternative";
@@ -74,7 +70,7 @@ public class CachingTest extends Abstrac
"Server failed to launch",
// run the server in the same process
// set this to false to fork
- launchServer(Server.class, true)
+ launchServer(CachingServer.class, true)
);
assertTrue(
"Server failed to launch",
@@ -91,101 +87,16 @@ public class CachingTest extends Abstrac
}
@org.junit.Test
- public void testSTSClientCaching() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = CachingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- SpringBusFactory.setDefaultBus(bus);
- SpringBusFactory.setThreadDefaultBus(bus);
-
- URL wsdl = CachingTest.class.getResource("DoubleIt.wsdl");
- Service service = Service.create(wsdl, SERVICE_QNAME);
- QName portQName = new QName(NAMESPACE, "DoubleItTransportSAML1Port");
- DoubleItPortType port =
- service.getPort(portQName, DoubleItPortType.class);
- updateAddressPort(port, PORT);
-
- // Make a successful invocation
- doubleIt(port, 25);
-
- // Change the STSClient so that it can no longer find the STS
- BindingProvider p = (BindingProvider)port;
- clearSTSClient(p);
-
- // This should succeed as the token is cached
- doubleIt(port, 30);
-
- // This should fail as the cached token is manually removed
- Client client = ClientProxy.getClient(port);
- Endpoint ep = client.getEndpoint();
- ep.remove(SecurityConstants.TOKEN_ID);
- ep.remove(SecurityConstants.TOKEN);
-
- try {
- doubleIt(port, 35);
- fail("Expected failure on clearing the cache");
- } catch (SOAPFaultException ex) {
- // Expected
- }
-
- ((java.io.Closeable)port).close();
- bus.shutdown(true);
- }
-
- @org.junit.Test
- public void testDisableProxyCaching() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = CachingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- SpringBusFactory.setDefaultBus(bus);
- SpringBusFactory.setThreadDefaultBus(bus);
-
- URL wsdl = CachingTest.class.getResource("DoubleIt.wsdl");
- Service service = Service.create(wsdl, SERVICE_QNAME);
- QName portQName = new QName(NAMESPACE, "DoubleItTransportSAML1Port2");
- DoubleItPortType port =
- service.getPort(portQName, DoubleItPortType.class);
- updateAddressPort(port, PORT);
-
- // Disable storing tokens per-proxy
- ((BindingProvider)port).getRequestContext().put(
- SecurityConstants.CACHE_ISSUED_TOKEN_IN_ENDPOINT, "false"
- );
-
- // Make a successful invocation
- doubleIt(port, 25);
-
- // Change the STSClient so that it can no longer find the STS
- BindingProvider p = (BindingProvider)port;
- clearSTSClient(p);
-
- // This should fail as it can't get the token
- try {
- doubleIt(port, 35);
- fail("Expected failure");
- } catch (SOAPFaultException ex) {
- // Expected
- }
-
- ((java.io.Closeable)port).close();
- bus.shutdown(true);
- }
-
- @org.junit.Test
public void testServerSideSAMLTokenCaching() throws Exception {
SpringBusFactory bf = new SpringBusFactory();
- URL busFile = CachingTest.class.getResource("cxf-client.xml");
+ URL busFile = ServerCachingTest.class.getResource("cxf-client.xml");
Bus bus = bf.createBus(busFile.toString());
SpringBusFactory.setDefaultBus(bus);
SpringBusFactory.setThreadDefaultBus(bus);
- URL wsdl = CachingTest.class.getResource("DoubleIt.wsdl");
+ URL wsdl = ServerCachingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
QName portQName = new QName(NAMESPACE,
"DoubleItTransportSAML1AlternativePort");
DoubleItPortType port =
@@ -230,13 +141,13 @@ public class CachingTest extends Abstrac
public void testServerSideUsernameTokenCaching() throws Exception {
SpringBusFactory bf = new SpringBusFactory();
- URL busFile = CachingTest.class.getResource("cxf-client.xml");
+ URL busFile = ServerCachingTest.class.getResource("cxf-client.xml");
Bus bus = bf.createBus(busFile.toString());
SpringBusFactory.setDefaultBus(bus);
SpringBusFactory.setThreadDefaultBus(bus);
- URL wsdl = CachingTest.class.getResource("DoubleIt.wsdl");
+ URL wsdl = ServerCachingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
QName portQName = new QName(NAMESPACE, "DoubleItTransportUTPort");
DoubleItPortType transportUTPort =
@@ -268,13 +179,13 @@ public class CachingTest extends Abstrac
public void testServerSideBinarySecurityTokenCaching() throws Exception {
SpringBusFactory bf = new SpringBusFactory();
- URL busFile = CachingTest.class.getResource("cxf-client.xml");
+ URL busFile = ServerCachingTest.class.getResource("cxf-client.xml");
Bus bus = bf.createBus(busFile.toString());
SpringBusFactory.setDefaultBus(bus);
SpringBusFactory.setThreadDefaultBus(bus);
- URL wsdl = CachingTest.class.getResource("DoubleIt.wsdl");
+ URL wsdl = ServerCachingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricBSTPort");
DoubleItPortType bstPort =
@@ -336,13 +247,6 @@ public class CachingTest extends Abstrac
return stsClient.requestSecurityToken(endpointAddress);
}
- private void clearSTSClient(BindingProvider p) throws BusException,
EndpointException {
- STSClient stsClient =
(STSClient)p.getRequestContext().get(SecurityConstants.STS_CLIENT);
- stsClient.getClient().destroy();
- stsClient.setWsdlLocation(null);
- stsClient.setLocation(null);
- }
-
private static void doubleIt(DoubleItPortType port, int numToDouble) {
int resp = port.doubleIt(numToDouble);
assertEquals(numToDouble * 2 , resp);
Copied:
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml
(from r1452390,
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml)
URL:
http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml?p2=cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml&p1=cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml&r1=1452390&r2=1452411&rev=1452411&view=diff
==============================================================================
---
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml
(original)
+++
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml
Mon Mar 4 17:23:48 2013
@@ -39,50 +39,12 @@
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
- <jaxws:endpoint id="doubleittransportsaml1"
- implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl"
- endpointName="s:DoubleItTransportSAML1Port"
- serviceName="s:DoubleItService"
- depends-on="ClientAuthHttpsSettings"
-
address="https://localhost:${testutil.ports.Server}/doubleit/services/doubleittransportsaml1"
- wsdlLocation="org/apache/cxf/systest/sts/caching/DoubleIt.wsdl"
- xmlns:s="http://www.example.org/contract/DoubleIt">
-
- <jaxws:properties>
- <entry key="ws-security.callback-handler"
-
value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
- <entry key="ws-security.signature.properties"
value="serviceKeystore.properties"/>
- <entry key="ws-security.saml1.validator">
- <bean
class="org.apache.cxf.ws.security.trust.STSTokenValidator"/>
- </entry>
- </jaxws:properties>
- </jaxws:endpoint>
-
- <jaxws:endpoint id="doubleittransportsaml12"
- implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl"
- endpointName="s:DoubleItTransportSAML1Port2"
- serviceName="s:DoubleItService"
- depends-on="ClientAuthHttpsSettings"
-
address="https://localhost:${testutil.ports.Server}/doubleit/services/doubleittransportsaml12"
- wsdlLocation="org/apache/cxf/systest/sts/caching/DoubleIt.wsdl"
- xmlns:s="http://www.example.org/contract/DoubleIt">
-
- <jaxws:properties>
- <entry key="ws-security.callback-handler"
-
value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
- <entry key="ws-security.signature.properties"
value="serviceKeystore.properties"/>
- <entry key="ws-security.saml1.validator">
- <bean
class="org.apache.cxf.ws.security.trust.STSTokenValidator"/>
- </entry>
- </jaxws:properties>
- </jaxws:endpoint>
-
<jaxws:endpoint id="doubleittransportsaml1alternative"
implementor="org.apache.cxf.systest.sts.caching.DoubleItPortTypeImpl"
endpointName="s:DoubleItTransportSAML1AlternativePort"
serviceName="s:DoubleItService"
depends-on="ClientAuthHttpsSettings"
-
address="https://localhost:${testutil.ports.Server}/doubleit/services/doubleittransportsaml1alternative"
+
address="https://localhost:${testutil.ports.CachingServer}/doubleit/services/doubleittransportsaml1alternative"
wsdlLocation="org/apache/cxf/systest/sts/caching/DoubleIt.wsdl"
xmlns:s="http://www.example.org/contract/DoubleIt">
@@ -116,7 +78,7 @@
endpointName="s:DoubleItTransportUTPort"
serviceName="s:DoubleItService"
depends-on="ClientAuthHttpsSettings"
-
address="https://localhost:${testutil.ports.Server}/doubleit/services/doubleittransportut"
+
address="https://localhost:${testutil.ports.CachingServer}/doubleit/services/doubleittransportut"
wsdlLocation="org/apache/cxf/systest/sts/caching/DoubleIt.wsdl"
xmlns:s="http://www.example.org/contract/DoubleIt">
@@ -146,7 +108,7 @@
implementor="org.apache.cxf.systest.sts.caching.DoubleItPortTypeImpl"
endpointName="s:DoubleItAsymmetricBSTPort"
serviceName="s:DoubleItService"
-
address="http://localhost:${testutil.ports.Server.2}/doubleit/services/doubleitasymmetricbst"
+
address="http://localhost:${testutil.ports.CachingServer.2}/doubleit/services/doubleitasymmetricbst"
wsdlLocation="org/apache/cxf/systest/sts/caching/DoubleIt.wsdl"
xmlns:s="http://www.example.org/contract/DoubleIt">
@@ -178,7 +140,7 @@
</jaxws:endpoint>
<httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.Server}">
+ <httpj:engine port="${testutil.ports.CachingServer}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass"
resource="servicestore.jks"/>
Modified:
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml
URL:
http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml?rev=1452411&r1=1452410&r2=1452411&view=diff
==============================================================================
---
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml
(original)
+++
cxf/branches/2.7.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml
Mon Mar 4 17:23:48 2013
@@ -77,106 +77,6 @@
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint id="doubleittransportsaml1alternative"
- implementor="org.apache.cxf.systest.sts.caching.DoubleItPortTypeImpl"
- endpointName="s:DoubleItTransportSAML1AlternativePort"
- serviceName="s:DoubleItService"
- depends-on="ClientAuthHttpsSettings"
-
address="https://localhost:${testutil.ports.Server}/doubleit/services/doubleittransportsaml1alternative"
- wsdlLocation="org/apache/cxf/systest/sts/caching/DoubleIt.wsdl"
- xmlns:s="http://www.example.org/contract/DoubleIt">
-
- <jaxws:properties>
- <entry key="ws-security.callback-handler"
-
value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
- <entry key="ws-security.signature.properties"
value="serviceKeystore.properties"/>
- <entry key="ws-security.saml1.validator">
- <bean class="org.apache.cxf.ws.security.trust.STSTokenValidator">
- <constructor-arg value="true"/>
- </bean>
- </entry>
- <entry key="ws-security.sts.client">
- <bean class="org.apache.cxf.ws.security.trust.STSClient">
- <constructor-arg ref="cxf"/>
- <property name="wsdlLocation"
-
value="https://localhost:${testutil.ports.STSServer}/SecurityTokenService/Transport?wsdl"/>
- <property name="serviceName"
-
value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService"/>
- <property name="endpointName"
-
value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Transport_Port"/>
- <property name="tokenType"
-
value="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0"/>
- </bean>
- </entry>
- </jaxws:properties>
- </jaxws:endpoint>
-
- <jaxws:endpoint id="doubleittransportut"
- implementor="org.apache.cxf.systest.sts.caching.DoubleItPortTypeImpl"
- endpointName="s:DoubleItTransportUTPort"
- serviceName="s:DoubleItService"
- depends-on="ClientAuthHttpsSettings"
-
address="https://localhost:${testutil.ports.Server}/doubleit/services/doubleittransportut"
- wsdlLocation="org/apache/cxf/systest/sts/caching/DoubleIt.wsdl"
- xmlns:s="http://www.example.org/contract/DoubleIt">
-
- <jaxws:properties>
- <entry key="ws-security.callback-handler"
-
value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
- <entry key="ws-security.ut.validator">
- <bean
class="org.apache.cxf.ws.security.trust.STSTokenValidator"/>
- </entry>
- <entry key="ws-security.sts.client">
- <bean class="org.apache.cxf.ws.security.trust.STSClient">
- <constructor-arg ref="cxf"/>
- <property name="wsdlLocation"
-
value="https://localhost:${testutil.ports.STSServer}/SecurityTokenService/Transport?wsdl"/>
- <property name="serviceName"
-
value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService"/>
- <property name="endpointName"
-
value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Transport_Port"/>
- <property name="tokenType"
-
value="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0"/>
- </bean>
- </entry>
- </jaxws:properties>
- </jaxws:endpoint>
-
- <jaxws:endpoint id="doubleitasymmetricbst"
- implementor="org.apache.cxf.systest.sts.caching.DoubleItPortTypeImpl"
- endpointName="s:DoubleItAsymmetricBSTPort"
- serviceName="s:DoubleItService"
-
address="http://localhost:${testutil.ports.Server.2}/doubleit/services/doubleitasymmetricbst"
- wsdlLocation="org/apache/cxf/systest/sts/caching/DoubleIt.wsdl"
- xmlns:s="http://www.example.org/contract/DoubleIt">
-
- <jaxws:properties>
- <entry key="ws-security.callback-handler"
-
value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
- <entry key="ws-security.bst.validator">
- <bean
class="org.apache.cxf.ws.security.trust.STSTokenValidator"/>
- </entry>
- <entry key="ws-security.signature.username" value="myservicekey"/>
- <entry key="ws-security.signature.properties"
value="serviceKeystore.properties"/>
- <entry key="ws-security.encryption.properties"
value="serviceKeystore.properties"/>
- <entry key="ws-security.encryption.username" value="useReqSigCert"/>
-
- <entry key="ws-security.sts.client">
- <bean class="org.apache.cxf.ws.security.trust.STSClient">
- <constructor-arg ref="cxf"/>
- <property name="wsdlLocation"
-
value="https://localhost:${testutil.ports.STSServer}/SecurityTokenService/Transport?wsdl"/>
- <property name="serviceName"
-
value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService"/>
- <property name="endpointName"
-
value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Transport_Port"/>
- <property name="tokenType"
-
value="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0"/>
- </bean>
- </entry>
- </jaxws:properties>
- </jaxws:endpoint>
-
<httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
<httpj:engine port="${testutil.ports.Server}">
<httpj:tlsServerParameters>