cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1298896 - in /cxf/branches/2.4.x-fixes: rt/ws/security/ rt/ws/security/src/main/java/org/apache/cxf/ws/security/ rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/ systests/ws-security/ systests/ws-security/src/test/resources/o...
Date Fri, 09 Mar 2012 16:04:16 GMT
Author: coheigea
Date: Fri Mar  9 16:04:16 2012
New Revision: 1298896

URL: http://svn.apache.org/viewvc?rev=1298896&view=rev
Log:
[CXF-1636] - Some updates for the 2.5.x-fixes branch

Modified:
    cxf/branches/2.4.x-fixes/rt/ws/security/pom.xml
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
    cxf/branches/2.4.x-fixes/systests/ws-security/pom.xml
    cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ut/server/server.xml
    cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/server/server.xml

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/pom.xml?rev=1298896&r1=1298895&r2=1298896&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/pom.xml (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/pom.xml Fri Mar  9 16:04:16 2012
@@ -76,7 +76,8 @@
             <groupId>net.sf.ehcache</groupId>
             <artifactId>ehcache-core</artifactId>
             <version>${cxf.ehcache.version}</version>
-            <scope>compile</scope>
+            <scope>provided</scope>
+            <optional>true</optional>
         </dependency>
         <dependency>
             <groupId>org.apache.ws.security</groupId>

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java?rev=1298896&r1=1298895&r2=1298896&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
Fri Mar  9 16:04:16 2012
@@ -138,9 +138,7 @@ public final class SecurityConstants {
         "ws-security.cache.issued.token.in.endpoint";
     
     /**
-     * Set this to "false" to not cache UsernameToken nonces. The default value is "true"
for
-     * message recipients, and "false" for message initiators. Set it to true to cache for
-     * both cases.
+     * Set this to "true" to cache UsernameToken nonces. The default value is "false".
      */
     public static final String ENABLE_NONCE_CACHE = 
         "ws-security.enable.nonce.cache";
@@ -153,9 +151,8 @@ public final class SecurityConstants {
         "ws-security.nonce.cache.instance";
     
     /**
-     * Set this to "false" to not cache Timestamp Created Strings (these are only cached
in 
-     * conjunction with a message Signature). The default value is "true" for message recipients,

-     * and "false" for message initiators. Set it to true to cache for both cases.
+     * Set this to "true" to cache Timestamp Created Strings (these are only cached in 
+     * conjunction with a message Signature). The default value is "false".
      */
     public static final String ENABLE_TIMESTAMP_CACHE = 
         "ws-security.enable.timestamp.cache";

Modified: cxf/branches/2.4.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.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java?rev=1298896&r1=1298895&r2=1298896&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Fri Mar  9 16:04:16 2012
@@ -661,10 +661,8 @@ public class WSS4JInInterceptor extends 
     
     /**
      * Get a ReplayCache instance. It first checks to see whether caching has been explicitly

-     * enabled or disabled via the booleanKey argument. If it has been set to false then
no
-     * replay caching is done (for this booleanKey). If it has not been specified, then caching
-     * is enabled only if we are not the initiator of the exchange. If it has been specified,
then
-     * caching is enabled.
+     * enabled or disabled via the booleanKey argument. If it has been set to false, or not
+     * specified, then no replay caching is done (for this booleanKey).
      * 
      * It tries to get an instance of ReplayCache via the instanceKey argument from a 
      * contextual property, and failing that the message exchange. If it can't find any,
then it
@@ -673,18 +671,11 @@ public class WSS4JInInterceptor extends 
     protected ReplayCache getReplayCache(
         SoapMessage message, String booleanKey, String instanceKey
     ) {
-        boolean specified = false;
         Object o = message.getContextualProperty(booleanKey);
-        if (o != null) {
-            if (!MessageUtils.isTrue(o)) {
-                return null;
-            }
-            specified = true;
-        }
-
-        if (!specified && MessageUtils.isRequestor(message)) {
+        if (o == null || !MessageUtils.isTrue(o)) {
             return null;
         }
+        
         Endpoint ep = message.getExchange().get(Endpoint.class);
         if (ep != null && ep.getEndpointInfo() != null) {
             EndpointInfo info = ep.getEndpointInfo();

Modified: cxf/branches/2.4.x-fixes/systests/ws-security/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/ws-security/pom.xml?rev=1298896&r1=1298895&r2=1298896&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/ws-security/pom.xml (original)
+++ cxf/branches/2.4.x-fixes/systests/ws-security/pom.xml Fri Mar  9 16:04:16 2012
@@ -191,6 +191,12 @@
              <artifactId>bcprov-jdk15</artifactId>
              <scope>test</scope>
         </dependency>
+        <dependency>
+             <groupId>net.sf.ehcache</groupId>
+             <artifactId>ehcache-core</artifactId>
+             <version>${cxf.ehcache.version}</version>
+             <scope>test</scope>
+        </dependency>
 
     </dependencies>
     <properties>

Modified: cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ut/server/server.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ut/server/server.xml?rev=1298896&r1=1298895&r2=1298896&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ut/server/server.xml
(original)
+++ cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ut/server/server.xml
Fri Mar  9 16:04:16 2012
@@ -116,6 +116,7 @@
        <jaxws:properties>
            <entry key="ws-security.callback-handler" 
                   value="org.apache.cxf.systest.ws.wssec10.client.UTPasswordCallback"/>
+           <entry key="ws-security.enable.nonce.cache" value="true"/>
        </jaxws:properties> 
      
     </jaxws:endpoint> 

Modified: cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/server/server.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/server/server.xml?rev=1298896&r1=1298895&r2=1298896&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/server/server.xml
(original)
+++ cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/server/server.xml
Fri Mar  9 16:04:16 2012
@@ -178,6 +178,7 @@
                   value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/> 
           <entry key="ws-security.encryption.properties" 
                   value="org/apache/cxf/systest/ws/wssec10/client/alice.properties"/>

+          <entry key="ws-security.enable.timestamp.cache" value="true"/>
        </jaxws:properties> 
      
     </jaxws:endpoint> 



Mime
View raw message