cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1346949 - in /cxf/branches/2.5.x-fixes: rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/ rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/ systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/...
Date Wed, 06 Jun 2012 15:32:22 GMT
Author: coheigea
Date: Wed Jun  6 15:32:22 2012
New Revision: 1346949

URL: http://svn.apache.org/viewvc?rev=1346949&view=rev
Log:
[CXF-4364] - Keep TokenStore and ReplayCache instances per-endpoint instead of per-bus


Conflicts:

	rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
	rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java
	rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/NegotiationUtils.java
	rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenValidator.java
	rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java

Modified:
    cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
    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/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/common/SecurityTestUtil.java
    cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/SecurityTestUtil.java

Modified: cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java?rev=1346949&r1=1346948&r2=1346949&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Wed Jun  6 15:32:22 2012
@@ -727,7 +727,11 @@ public class WSS4JInInterceptor extends 
                 }
                 if (replayCache == null) {
                     ReplayCacheFactory replayCacheFactory = ReplayCacheFactory.newInstance();
-                    replayCache = replayCacheFactory.newReplayCache(instanceKey, message);
+                    String cacheKey = instanceKey;
+                    if (info.getName() != null) {
+                        cacheKey += "-" + info.getName().toString().hashCode();
+                    }
+                    replayCache = replayCacheFactory.newReplayCache(cacheKey, message);
                     info.setProperty(instanceKey, replayCache);
                 }
                 return replayCache;

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=1346949&r1=1346948&r2=1346949&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
Wed Jun  6 15:32:22 2012
@@ -120,13 +120,14 @@ public abstract class AbstractSecurityTe
     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/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=1346949&r1=1346948&r2=1346949&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/common/SecurityTestUtil.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/common/SecurityTestUtil.java
Wed Jun  6 15:32:22 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/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=1346949&r1=1346948&r2=1346949&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/SecurityTestUtil.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/SecurityTestUtil.java
Wed Jun  6 15:32:22 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();
+                    }
+                }
             }
         }
     }



Mime
View raw message