You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/04/06 16:29:04 UTC
svn commit: r1310340 - in /cxf/branches/2.5.x-fixes:
rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/
services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/asymmetric_encr/
services/sts/systests/advanced/src/test/java/or...
Author: dkulp
Date: Fri Apr 6 14:29:02 2012
New Revision: 1310340
URL: http://svn.apache.org/viewvc?rev=1310340&view=rev
Log:
Merged revisions 1307351 via git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1307351 | coheigea | 2012-03-30 06:47:43 -0400 (Fri, 30 Mar 2012) | 2 lines
Updating security tests to delete the EhCache replay caches in java.io.tmpdir after the test run
........
Added:
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java (with props)
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java (with props)
cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/common/SecurityTestUtil.java (with props)
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/SecurityTestUtil.java (with props)
Modified:
cxf/branches/2.5.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractSecurityTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/asymmetric_encr/AsymmetricEncryptionTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxrsBasicAuthTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxwsBasicAuthTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/binarysecuritytoken/BinarySecurityTokenTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/claims/ClaimsTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomOnBehalfOfTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/DistributedCachingTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/kerberos/KerberosTokenTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/DifferentRealmTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecureConversationTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenCancelTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenUnitTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/soap12/Soap12Test.java
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/transformation/TransformationTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/usernametoken/UsernameTokenTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationCachingTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/SenderVouchesTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.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/java/org/apache/cxf/systest/sts/x509_symmetric/X509SymmetricBindingTest.java
cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlTokenTest.java
cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/secconv/SecureConversationTest.java
cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/ut/UsernameTokenTest.java
cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/x509/X509TokenTest.java
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/gcm/GCMTest.java
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/PolicyAlternativeTest.java
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/SamlTokenTest.java
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/spnego/SpnegoTokenTest.java
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenDerivedTest.java
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenTest.java
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCTest.java
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10Test.java
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10UsernameAuthorizationLegacyTest.java
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10UsernameAuthorizationTest.java
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity111Test.java
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity112Test.java
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java
Modified: cxf/branches/2.5.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractSecurityTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractSecurityTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractSecurityTest.java (original)
+++ cxf/branches/2.5.x-fixes/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractSecurityTest.java Fri Apr 6 14:29:02 2012
@@ -18,6 +18,7 @@
*/
package org.apache.cxf.ws.security.wss4j;
+import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -114,4 +115,19 @@ public abstract class AbstractSecurityTe
}
return false;
}
+
+ @org.junit.AfterClass
+ 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();
+ }
+ }
+ }
}
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/asymmetric_encr/AsymmetricEncryptionTest.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/asymmetric_encr/AsymmetricEncryptionTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/asymmetric_encr/AsymmetricEncryptionTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/asymmetric_encr/AsymmetricEncryptionTest.java Fri Apr 6 14:29:02 2012
@@ -24,6 +24,7 @@ import java.util.Map;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.secure_conv.SecurityContextTokenUnitTest;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
@@ -50,6 +51,11 @@ public class AsymmetricEncryptionTest ex
launchServer(STSServer.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testEncryptedToken() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxrsBasicAuthTest.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/basic_auth/JaxrsBasicAuthTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxrsBasicAuthTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxrsBasicAuthTest.java Fri Apr 6 14:29:02 2012
@@ -20,6 +20,7 @@ package org.apache.cxf.systest.sts.basic
import org.apache.cxf.jaxrs.client.ServerWebApplicationException;
import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -51,6 +52,11 @@ public class JaxrsBasicAuthTest extends
launchServer(STSServer.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testBasicAuth() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxwsBasicAuthTest.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/basic_auth/JaxwsBasicAuthTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxwsBasicAuthTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxwsBasicAuthTest.java Fri Apr 6 14:29:02 2012
@@ -25,6 +25,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -60,6 +61,11 @@ public class JaxwsBasicAuthTest extends
launchServer(STSServer.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testBasicAuth() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/binarysecuritytoken/BinarySecurityTokenTest.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/binarysecuritytoken/BinarySecurityTokenTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/binarysecuritytoken/BinarySecurityTokenTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/binarysecuritytoken/BinarySecurityTokenTest.java Fri Apr 6 14:29:02 2012
@@ -25,6 +25,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -60,6 +61,11 @@ public class BinarySecurityTokenTest ext
launchServer(STSServer.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testBinarySecurityToken() throws Exception {
Modified: cxf/branches/2.5.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.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java Fri Apr 6 14:29:02 2012
@@ -34,6 +34,7 @@ import org.apache.cxf.bus.spring.SpringB
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
@@ -80,6 +81,11 @@ public class CachingTest extends Abstrac
launchServer(STSServer.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testSTSClientCaching() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/claims/ClaimsTest.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/claims/ClaimsTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/claims/ClaimsTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/claims/ClaimsTest.java Fri Apr 6 14:29:02 2012
@@ -25,6 +25,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -61,6 +62,11 @@ public class ClaimsTest extends Abstract
launchServer(STSServer.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testSaml1Claims() throws Exception {
Added: 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=1310340&view=auto
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java (added)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java Fri Apr 6 14:29:02 2012
@@ -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.common;
+
+import java.io.File;
+
+/**
+ * A utility class for security tests
+ */
+public final class SecurityTestUtil {
+
+ private SecurityTestUtil() {
+ // complete
+ }
+
+ 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();
+ }
+ }
+ }
+
+}
Propchange: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomOnBehalfOfTest.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/custom_onbehalfof/CustomOnBehalfOfTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomOnBehalfOfTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomOnBehalfOfTest.java Fri Apr 6 14:29:02 2012
@@ -26,6 +26,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -64,6 +65,11 @@ public class CustomOnBehalfOfTest extend
launchServer(STSServer.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testUsernameOnBehalfOf() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/DistributedCachingTest.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/distributed_caching/DistributedCachingTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/DistributedCachingTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/DistributedCachingTest.java Fri Apr 6 14:29:02 2012
@@ -25,6 +25,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.example.contract.doubleit.DoubleItPortType;
@@ -69,6 +70,11 @@ public class DistributedCachingTest exte
launchServer(STSServer2.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testSecurityContextToken() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/kerberos/KerberosTokenTest.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/kerberos/KerberosTokenTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/kerberos/KerberosTokenTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/kerberos/KerberosTokenTest.java Fri Apr 6 14:29:02 2012
@@ -25,6 +25,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -65,6 +66,11 @@ public class KerberosTokenTest extends A
launchServer(STSServer.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
@org.junit.Ignore
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/DifferentRealmTest.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/realms/DifferentRealmTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/DifferentRealmTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/DifferentRealmTest.java Fri Apr 6 14:29:02 2012
@@ -25,6 +25,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.example.contract.doubleit.DoubleItPortType;
@@ -65,6 +66,11 @@ public class DifferentRealmTest extends
launchServer(STSServer2.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
/**
* In this test, a token is issued by the first STS in realm "A". The second STS is configured
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecureConversationTest.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/secure_conv/SecureConversationTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecureConversationTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecureConversationTest.java Fri Apr 6 14:29:02 2012
@@ -25,6 +25,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.example.contract.doubleit.DoubleItPortType;
@@ -60,6 +61,11 @@ public class SecureConversationTest exte
launchServer(STSServer.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testSecureConversation() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenCancelTest.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/secure_conv/SecurityContextTokenCancelTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenCancelTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenCancelTest.java Fri Apr 6 14:29:02 2012
@@ -24,6 +24,7 @@ import java.util.Map;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
import org.apache.cxf.ws.security.tokenstore.SecurityToken;
@@ -50,6 +51,11 @@ public class SecurityContextTokenCancelT
launchServer(STSServer.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testCancelSecurityContextToken() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenUnitTest.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/secure_conv/SecurityContextTokenUnitTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenUnitTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SecurityContextTokenUnitTest.java Fri Apr 6 14:29:02 2012
@@ -24,6 +24,7 @@ import java.util.Map;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
import org.apache.cxf.ws.security.tokenstore.SecurityToken;
@@ -47,6 +48,11 @@ public class SecurityContextTokenUnitTes
launchServer(STSServer.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testSecurityContextToken() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/soap12/Soap12Test.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/soap12/Soap12Test.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/soap12/Soap12Test.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/soap12/Soap12Test.java Fri Apr 6 14:29:02 2012
@@ -30,6 +30,7 @@ import org.w3c.dom.Element;
import org.apache.cxf.Bus;
import org.apache.cxf.binding.soap.SoapFault;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
@@ -74,6 +75,11 @@ public class Soap12Test extends Abstract
launchServer(STSServer.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testSAML2() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/transformation/TransformationTest.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/transformation/TransformationTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/transformation/TransformationTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/transformation/TransformationTest.java Fri Apr 6 14:29:02 2012
@@ -25,6 +25,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -61,6 +62,11 @@ public class TransformationTest extends
launchServer(STSServer.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testTokenTransformation() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/usernametoken/UsernameTokenTest.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/usernametoken/UsernameTokenTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/usernametoken/UsernameTokenTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/usernametoken/UsernameTokenTest.java Fri Apr 6 14:29:02 2012
@@ -25,6 +25,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -59,6 +60,11 @@ public class UsernameTokenTest extends A
launchServer(STSServer.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testUsernameToken() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.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/asymmetric/AsymmetricBindingTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java Fri Apr 6 14:29:02 2012
@@ -27,6 +27,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -70,6 +71,11 @@ public class AsymmetricBindingTest exten
);
}
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testUsernameTokenSAML1() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.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/bearer/BearerTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.java Fri Apr 6 14:29:02 2012
@@ -33,6 +33,7 @@ import org.apache.cxf.bus.spring.SpringB
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -81,6 +82,11 @@ public class BearerTest extends Abstract
);
}
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testSAML2Bearer() throws Exception {
Added: 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=1310340&view=auto
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java (added)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java Fri Apr 6 14:29:02 2012
@@ -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.common;
+
+import java.io.File;
+
+/**
+ * A utility class for security tests
+ */
+public final class SecurityTestUtil {
+
+ private SecurityTestUtil() {
+ // complete
+ }
+
+ 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();
+ }
+ }
+ }
+
+}
Propchange: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationCachingTest.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/intermediary_transformation/IntermediaryTransformationCachingTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationCachingTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationCachingTest.java Fri Apr 6 14:29:02 2012
@@ -26,6 +26,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -79,6 +80,11 @@ public class IntermediaryTransformationC
);
}
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testIntermediaryTransformationCaching() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationTest.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/intermediary_transformation/IntermediaryTransformationTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationTest.java Fri Apr 6 14:29:02 2012
@@ -26,6 +26,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -80,6 +81,11 @@ public class IntermediaryTransformationT
);
}
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testIntermediaryTransformation() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.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/issueunit/IssueUnitTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java Fri Apr 6 14:29:02 2012
@@ -33,6 +33,7 @@ import org.w3c.dom.Element;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
@@ -89,6 +90,11 @@ public class IssueUnitTest extends Abstr
);
}
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
/**
* Test the Symmetric Key SAML1 case
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/SenderVouchesTest.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/sendervouches/SenderVouchesTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/SenderVouchesTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/SenderVouchesTest.java Fri Apr 6 14:29:02 2012
@@ -25,6 +25,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.example.contract.doubleit.DoubleItPortType;
@@ -59,6 +60,11 @@ public class SenderVouchesTest extends A
launchServer(Intermediary.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testSenderVouches() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.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/symmetric/SymmetricBindingTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java Fri Apr 6 14:29:02 2012
@@ -27,6 +27,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -71,6 +72,11 @@ public class SymmetricBindingTest extend
}
}
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
+
@org.junit.Test
public void testUsernameTokenSAML1() throws Exception {
SpringBusFactory bf = new SpringBusFactory();
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.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/transport/TransportBindingTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java Fri Apr 6 14:29:02 2012
@@ -26,6 +26,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -68,6 +69,11 @@ public class TransportBindingTest extend
);
}
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testSAML1() throws Exception {
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=1310340&r1=1310339&r2=1310340&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 Fri Apr 6 14:29:02 2012
@@ -26,6 +26,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -75,6 +76,11 @@ public class UsernameActAsTest extends A
);
}
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testUsernameActAs() throws Exception {
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=1310340&r1=1310339&r2=1310340&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 Fri Apr 6 14:29:02 2012
@@ -26,6 +26,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -74,6 +75,11 @@ public class UsernameOnBehalfOfTest exte
);
}
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testUsernameOnBehalfOf() throws Exception {
Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/X509SymmetricBindingTest.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/x509_symmetric/X509SymmetricBindingTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/X509SymmetricBindingTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/X509SymmetricBindingTest.java Fri Apr 6 14:29:02 2012
@@ -27,6 +27,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -70,6 +71,11 @@ public class X509SymmetricBindingTest ex
);
}
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testX509SAML1() throws Exception {
Added: cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/common/SecurityTestUtil.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/common/SecurityTestUtil.java?rev=1310340&view=auto
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/common/SecurityTestUtil.java (added)
+++ cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/common/SecurityTestUtil.java Fri Apr 6 14:29:02 2012
@@ -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.wssec.examples.common;
+
+import java.io.File;
+
+/**
+ * A utility class for security tests
+ */
+public final class SecurityTestUtil {
+
+ private SecurityTestUtil() {
+ // complete
+ }
+
+ 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();
+ }
+ }
+ }
+
+}
Propchange: cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/common/SecurityTestUtil.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/common/SecurityTestUtil.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlTokenTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlTokenTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlTokenTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlTokenTest.java Fri Apr 6 14:29:02 2012
@@ -27,6 +27,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.wssec.examples.common.SecurityTestUtil;
import org.apache.cxf.systest.wssec.examples.saml.server.Server;
import org.apache.cxf.systest.wssec.examples.sts.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -64,6 +65,11 @@ public class SamlTokenTest extends Abstr
launchServer(STSServer.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
/**
* 2.3.1.1 (WSS1.0) SAML1.1 Assertion (Bearer)
Modified: cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/secconv/SecureConversationTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/secconv/SecureConversationTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/secconv/SecureConversationTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/secconv/SecureConversationTest.java Fri Apr 6 14:29:02 2012
@@ -26,6 +26,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.wssec.examples.common.SecurityTestUtil;
import org.apache.cxf.systest.wssec.examples.secconv.server.Server;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -53,6 +54,11 @@ public class SecureConversationTest exte
);
}
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
+
/**
* 2.4.1 (WSS 1.0) Secure Conversation bootstrapped by Mutual
* Authentication with X.509 Certificates
Modified: cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/ut/UsernameTokenTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/ut/UsernameTokenTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/ut/UsernameTokenTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/ut/UsernameTokenTest.java Fri Apr 6 14:29:02 2012
@@ -26,6 +26,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.wssec.examples.common.SecurityTestUtil;
import org.apache.cxf.systest.wssec.examples.ut.server.Server;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -53,6 +54,11 @@ public class UsernameTokenTest extends A
launchServer(Server.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
/**
* 2.1.1.1 UsernameToken with plain text password
Modified: cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/x509/X509TokenTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/x509/X509TokenTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/x509/X509TokenTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/x509/X509TokenTest.java Fri Apr 6 14:29:02 2012
@@ -26,6 +26,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.wssec.examples.common.SecurityTestUtil;
import org.apache.cxf.systest.wssec.examples.x509.server.Server;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -52,6 +53,11 @@ public class X509TokenTest extends Abstr
launchServer(Server.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
/**
* 2.2.1 (WSS1.0) X.509 Certificates, Sign, Encrypt
Added: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/SecurityTestUtil.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/SecurityTestUtil.java?rev=1310340&view=auto
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/SecurityTestUtil.java (added)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/SecurityTestUtil.java Fri Apr 6 14:29:02 2012
@@ -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.ws.common;
+
+import java.io.File;
+
+/**
+ * A utility class for security tests
+ */
+public final class SecurityTestUtil {
+
+ private SecurityTestUtil() {
+ // complete
+ }
+
+ 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();
+ }
+ }
+ }
+
+}
Propchange: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/SecurityTestUtil.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/SecurityTestUtil.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/gcm/GCMTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/gcm/GCMTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/gcm/GCMTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/gcm/GCMTest.java Fri Apr 6 14:29:02 2012
@@ -29,6 +29,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
import org.apache.cxf.systest.ws.gcm.server.Server;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -56,6 +57,11 @@ public class GCMTest extends AbstractBus
launchServer(Server.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testAESGCM128() throws Exception {
Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java Fri Apr 6 14:29:02 2012
@@ -29,6 +29,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
import org.apache.cxf.systest.ws.kerberos.server.Server;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -67,6 +68,11 @@ public class KerberosTokenTest extends A
launchServer(Server.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
@org.junit.Ignore
Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/PolicyAlternativeTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/PolicyAlternativeTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/PolicyAlternativeTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/PolicyAlternativeTest.java Fri Apr 6 14:29:02 2012
@@ -26,6 +26,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
import org.apache.cxf.systest.ws.policy.server.Server;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -54,6 +55,11 @@ public class PolicyAlternativeTest exten
);
}
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
+
/**
* The client uses the Asymmetric policy - this should succeed.
*/
Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/SamlTokenTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/SamlTokenTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/SamlTokenTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/SamlTokenTest.java Fri Apr 6 14:29:02 2012
@@ -30,6 +30,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
import org.apache.cxf.systest.ws.saml.client.SamlCallbackHandler;
import org.apache.cxf.systest.ws.saml.server.Server;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -60,6 +61,11 @@ public class SamlTokenTest extends Abstr
launchServer(Server.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testSaml1OverTransport() throws Exception {
Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java Fri Apr 6 14:29:02 2012
@@ -53,6 +53,7 @@ import org.apache.cxf.jaxws.EndpointImpl
import org.apache.cxf.message.Message;
import org.apache.cxf.service.model.EndpointInfo;
import org.apache.cxf.systest.ws.common.DoubleItImpl;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.policy.PolicyEngine;
import org.apache.cxf.ws.security.SecurityConstants;
@@ -196,6 +197,11 @@ public class SecurityPolicyTest extends
ei.setProperty(Message.SCHEMA_VALIDATION_ENABLED, Boolean.TRUE);
}
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
+
private static void setCryptoProperties(EndpointInfo ei, String sigProps, String encProps) {
ei.setProperty(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
ei.setProperty(SecurityConstants.SIGNATURE_PROPERTIES,
Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java Fri Apr 6 14:29:02 2012
@@ -47,6 +47,7 @@ import org.apache.cxf.bus.spring.SpringB
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.jaxws.DispatchImpl;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.transport.http.HTTPConduit;
import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
@@ -103,6 +104,11 @@ public class WSSecurityClientTest extend
);
}
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
+
@Test
public void testUsernameToken() throws Exception {
final javax.xml.ws.Service svc
Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/spnego/SpnegoTokenTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/spnego/SpnegoTokenTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/spnego/SpnegoTokenTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/spnego/SpnegoTokenTest.java Fri Apr 6 14:29:02 2012
@@ -29,6 +29,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
import org.apache.cxf.systest.ws.spnego.server.Server;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -64,6 +65,11 @@ public class SpnegoTokenTest extends Abs
launchServer(Server.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
@org.junit.Ignore
Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenDerivedTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenDerivedTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenDerivedTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenDerivedTest.java Fri Apr 6 14:29:02 2012
@@ -26,6 +26,7 @@ import javax.xml.ws.Service;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
import org.apache.cxf.systest.ws.ut.server.ServerDerived;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -52,6 +53,11 @@ public class UsernameTokenDerivedTest ex
launchServer(ServerDerived.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
/**
* Here the key derived from a UsernameToken is used as a protection token for the
Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenTest.java Fri Apr 6 14:29:02 2012
@@ -28,6 +28,7 @@ import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
import org.apache.cxf.systest.ws.ut.server.Server;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.example.contract.doubleit.DoubleItPortType;
@@ -51,6 +52,11 @@ public class UsernameTokenTest extends A
launchServer(Server.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testPlaintext() throws Exception {
Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCTest.java Fri Apr 6 14:29:02 2012
@@ -25,6 +25,7 @@ import javax.xml.ws.BindingProvider;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
import org.apache.cxf.systest.ws.wssc.server.Server;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
@@ -59,6 +60,11 @@ public class WSSCTest extends AbstractBu
svc = new wssec.wssc.PingService();
}
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
+
@Test
public void testSecureConversationMutualCertificate10SignEncryptIPingService() throws Exception {
Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10Test.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10Test.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10Test.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10Test.java Fri Apr 6 14:29:02 2012
@@ -30,6 +30,7 @@ import org.apache.cxf.BusFactory;
import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
import org.apache.cxf.systest.ws.wssec10.server.Server;
import org.apache.cxf.systest.ws.wssec11.WSSecurity11Common;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -67,6 +68,11 @@ public class WSSecurity10Test extends Ab
launchServer(Server.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@Test
public void testClientServer() {
Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10UsernameAuthorizationLegacyTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10UsernameAuthorizationLegacyTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10UsernameAuthorizationLegacyTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10UsernameAuthorizationLegacyTest.java Fri Apr 6 14:29:02 2012
@@ -28,6 +28,7 @@ import javax.xml.namespace.QName;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
import org.apache.cxf.systest.ws.wssec10.server.AuthorizedServer2;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -58,6 +59,11 @@ public class WSSecurity10UsernameAuthori
);
}
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
+
@Test
public void testClientServerComplexPolicyAuthorized() {
Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10UsernameAuthorizationTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10UsernameAuthorizationTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10UsernameAuthorizationTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10UsernameAuthorizationTest.java Fri Apr 6 14:29:02 2012
@@ -28,6 +28,7 @@ import javax.xml.namespace.QName;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
import org.apache.cxf.systest.ws.wssec10.server.AuthorizedServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -57,6 +58,11 @@ public class WSSecurity10UsernameAuthori
launchServer(AuthorizedServer.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@Test
public void testClientServerUTOnlyAuthorized() {
Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity111Test.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity111Test.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity111Test.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity111Test.java Fri Apr 6 14:29:02 2012
@@ -19,6 +19,7 @@
package org.apache.cxf.systest.ws.wssec11;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
import org.apache.cxf.systest.ws.wssec11.server.Server;
import org.apache.cxf.systest.ws.wssec11.server.ServerRestricted;
import org.junit.BeforeClass;
@@ -59,6 +60,11 @@ public class WSSecurity111Test extends W
);
}
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@Test
public void testClientServer() {
Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity112Test.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity112Test.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity112Test.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity112Test.java Fri Apr 6 14:29:02 2012
@@ -20,6 +20,7 @@
package org.apache.cxf.systest.ws.wssec11;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
import org.apache.cxf.systest.ws.wssec11.server.Server;
import org.apache.cxf.systest.ws.wssec11.server.ServerRestricted;
import org.junit.BeforeClass;
@@ -60,6 +61,11 @@ public class WSSecurity112Test extends W
);
}
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@Test
public void testClientServer() {
Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java?rev=1310340&r1=1310339&r2=1310340&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java Fri Apr 6 14:29:02 2012
@@ -31,6 +31,7 @@ import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
import org.apache.cxf.systest.ws.ut.SecurityHeaderCacheInterceptor;
import org.apache.cxf.systest.ws.x509.server.Server;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -60,6 +61,11 @@ public class X509TokenTest extends Abstr
launchServer(Server.class, true)
);
}
+
+ @org.junit.AfterClass
+ public static void cleanup() {
+ SecurityTestUtil.cleanup();
+ }
@org.junit.Test
public void testKeyIdentifier() throws Exception {