Author: coheigea
Date: Wed Jun 6 16:28:47 2012
New Revision: 1346970
URL: http://svn.apache.org/viewvc?rev=1346970&view=rev
Log:
Merged revisions 1346956 via git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1346956 | coheigea | 2012-06-06 16:51:18 +0100 (Wed, 06 Jun 2012) | 2 lines
Switching to forkmode once for the STS basic systests
........
Modified:
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
cxf/branches/2.5.x-fixes/services/sts/systests/basic/pom.xml
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-client.xml
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service.xml
Modified:
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java?rev=1346970&r1=1346969&r2=1346970&view=diff
==============================================================================
---
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
(original)
+++
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
Wed Jun 6 16:28:47 2012
@@ -32,13 +32,14 @@ public final class SecurityTestUtil {
public static void cleanup() {
String tmpDir = System.getProperty("java.io.tmpdir");
if (tmpDir != null) {
- File nonceFile = new File(tmpDir + File.separator +
"ws-security.nonce.cache.instance.data");
- if (nonceFile.exists()) {
- nonceFile.delete();
- }
- File tsFile = new File(tmpDir + File.separator +
"ws-security.timestamp.cache.instance.data");
- if (tsFile.exists()) {
- tsFile.delete();
+ File[] tmpFiles = new File(tmpDir).listFiles();
+ if (tmpFiles != null) {
+ for (File tmpFile : tmpFiles) {
+ if (tmpFile.exists() &&
(tmpFile.getName().startsWith("ws-security.nonce.cache.instance")
+ ||
tmpFile.getName().startsWith("ws-security.timestamp.cache.instance"))) {
+ tmpFile.delete();
+ }
+ }
}
}
}
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/basic/pom.xml?rev=1346970&r1=1346969&r2=1346970&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/pom.xml (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/pom.xml Wed Jun 6
16:28:47 2012
@@ -146,10 +146,6 @@
</plugins>
</build>
- <properties>
- <cxf.surefire.fork.mode>pertest</cxf.surefire.fork.mode>
- </properties>
-
<profiles>
<profile>
<id>standalone</id>
Modified:
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java?rev=1346970&r1=1346969&r2=1346970&view=diff
==============================================================================
---
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
(original)
+++
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
Wed Jun 6 16:28:47 2012
@@ -32,13 +32,14 @@ public final class SecurityTestUtil {
public static void cleanup() {
String tmpDir = System.getProperty("java.io.tmpdir");
if (tmpDir != null) {
- File nonceFile = new File(tmpDir + File.separator +
"ws-security.nonce.cache.instance.data");
- if (nonceFile.exists()) {
- nonceFile.delete();
- }
- File tsFile = new File(tmpDir + File.separator +
"ws-security.timestamp.cache.instance.data");
- if (tsFile.exists()) {
- tsFile.delete();
+ File[] tmpFiles = new File(tmpDir).listFiles();
+ if (tmpFiles != null) {
+ for (File tmpFile : tmpFiles) {
+ if (tmpFile.exists() &&
(tmpFile.getName().startsWith("ws-security.nonce.cache.instance")
+ ||
tmpFile.getName().startsWith("ws-security.timestamp.cache.instance"))) {
+ tmpFile.delete();
+ }
+ }
}
}
}
Modified:
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java?rev=1346970&r1=1346969&r2=1346970&view=diff
==============================================================================
---
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
(original)
+++
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
Wed Jun 6 16:28:47 2012
@@ -170,7 +170,7 @@ public class UsernameActAsTest extends A
// Change the STSClient so that it can no longer find the STS
STSClient stsClient = new STSClient(bus);
- stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
+ stsClient.setActAs(new WSSUsernameCallbackHandler());
BindingProvider p = (BindingProvider)bearerPort;
p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
@@ -189,7 +189,7 @@ public class UsernameActAsTest extends A
// Change the STSClient so that it can no longer find the STS
stsClient = new STSClient(bus);
- stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
+ stsClient.setActAs(new WSSUsernameCallbackHandler());
p = (BindingProvider)bearerPort2;
p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
@@ -272,7 +272,7 @@ public class UsernameActAsTest extends A
// Change the STSClient so that it can no longer find the STS
STSClient stsClient = new STSClient(bus);
- stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
+ stsClient.setActAs(new WSSUsernameCallbackHandler());
BindingProvider p = (BindingProvider)bearerPort;
p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
@@ -364,7 +364,7 @@ public class UsernameActAsTest extends A
// Change the STSClient so that it can no longer find the STS
STSClient stsClient = new STSClient(bus);
- stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
+ stsClient.setActAs(new WSSUsernameCallbackHandler());
p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
// Make a successful invocation - should work as token is cached
@@ -446,7 +446,7 @@ public class UsernameActAsTest extends A
// Change the STSClient so that it can no longer find the STS
stsClient = new STSClient(bus);
- stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
+ stsClient.setActAs(new WSSUsernameCallbackHandler());
stsClient.setEnableAppliesTo(false);
p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
Modified:
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java?rev=1346970&r1=1346969&r2=1346970&view=diff
==============================================================================
---
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
(original)
+++
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
Wed Jun 6 16:28:47 2012
@@ -94,7 +94,7 @@ public class UsernameOnBehalfOfTest exte
URL wsdl = UsernameOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
- QName portQName = new QName(NAMESPACE,
"DoubleItAsymmetricSAML2BearerPort");
+ QName portQName = new QName(NAMESPACE,
"DoubleItOBOAsymmetricSAML2BearerPort");
DoubleItPortType bearerPort =
service.getPort(portQName, DoubleItPortType.class);
updateAddressPort(bearerPort, PORT);
@@ -143,7 +143,7 @@ public class UsernameOnBehalfOfTest exte
URL wsdl = UsernameOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
- QName portQName = new QName(NAMESPACE,
"DoubleItAsymmetricSAML2BearerPort");
+ QName portQName = new QName(NAMESPACE,
"DoubleItOBOAsymmetricSAML2BearerPort");
//
// Proxy no. 1
@@ -233,7 +233,7 @@ public class UsernameOnBehalfOfTest exte
URL wsdl = UsernameOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
- QName portQName = new QName(NAMESPACE,
"DoubleItAsymmetricSAML2BearerPort");
+ QName portQName = new QName(NAMESPACE,
"DoubleItOBOAsymmetricSAML2BearerPort");
DoubleItPortType bearerPort =
service.getPort(portQName, DoubleItPortType.class);
@@ -325,7 +325,7 @@ public class UsernameOnBehalfOfTest exte
URL wsdl = UsernameOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
- QName portQName = new QName(NAMESPACE,
"DoubleItAsymmetricSAML2BearerPort");
+ QName portQName = new QName(NAMESPACE,
"DoubleItOBOAsymmetricSAML2BearerPort");
DoubleItPortType bearerPort =
service.getPort(portQName, DoubleItPortType.class);
@@ -418,7 +418,7 @@ public class UsernameOnBehalfOfTest exte
URL wsdl = UsernameOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
- QName portQName = new QName(NAMESPACE,
"DoubleItAsymmetricSAML2BearerPort");
+ QName portQName = new QName(NAMESPACE,
"DoubleItOBOAsymmetricSAML2BearerPort");
DoubleItPortType bearerPort =
service.getPort(portQName, DoubleItPortType.class);
Modified:
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl
URL:
http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl?rev=1346970&r1=1346969&r2=1346970&view=diff
==============================================================================
---
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl
(original)
+++
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl
Wed Jun 6 16:28:47 2012
@@ -46,10 +46,10 @@
</wsdl:binding>
<wsdl:service name="DoubleItService">
- <wsdl:port name="DoubleItAsymmetricSAML2BearerPort"
+ <wsdl:port name="DoubleItOBOAsymmetricSAML2BearerPort"
binding="tns:DoubleItAsymmetricSAML2BearerBinding">
<soap:address
-
location="http://localhost:8082/doubleit/services/doubleitasymmetricsaml2bearer"
/>
+
location="http://localhost:8082/doubleit/services/doubleitasymmetricsaml2bearerobo"
/>
</wsdl:port>
</wsdl:service>
Modified:
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-client.xml
URL:
http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-client.xml?rev=1346970&r1=1346969&r2=1346970&view=diff
==============================================================================
---
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-client.xml
(original)
+++
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-client.xml
Wed Jun 6 16:28:47 2012
@@ -37,7 +37,7 @@ http://cxf.apache.org/configuration/secu
<bean id="delegationCallbackHandler"
class="org.apache.cxf.ws.security.trust.delegation.WSSUsernameCallbackHandler"
/>
- <jaxws:client
name="{http://www.example.org/contract/DoubleIt}DoubleItAsymmetricSAML2BearerPort"
+ <jaxws:client
name="{http://www.example.org/contract/DoubleIt}DoubleItOBOAsymmetricSAML2BearerPort"
createdFromAPI="true">
<jaxws:properties>
<entry key="ws-security.signature.properties"
value="clientKeystore.properties"/>
Modified:
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service.xml
URL:
http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service.xml?rev=1346970&r1=1346969&r2=1346970&view=diff
==============================================================================
---
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service.xml
(original)
+++
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service.xml
Wed Jun 6 16:28:47 2012
@@ -41,9 +41,9 @@
<jaxws:endpoint id="doubleitasymmetricsaml2bearer"
implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl"
- endpointName="s:DoubleItAsymmetricSAML2BearerPort"
+ endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort"
serviceName="s:DoubleItService"
-
address="http://localhost:${testutil.ports.Server}/doubleit/services/doubleitasymmetricsaml2bearer"
+
address="http://localhost:${testutil.ports.Server}/doubleit/services/doubleitasymmetricsaml2bearerobo"
wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl"
xmlns:s="http://www.example.org/contract/DoubleIt">