Author: coheigea
Date: Fri Mar 9 15:51:15 2012
New Revision: 1298890
URL: http://svn.apache.org/viewvc?rev=1298890&view=rev
Log:
[CXF-1636] - Some updates for the 2.5.x-fixes branch
Modified:
cxf/branches/2.5.x-fixes/rt/ws/security/pom.xml
cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
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/systests/ws-security/pom.xml
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ut/server/server.xml
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/server/server.xml
Modified: cxf/branches/2.5.x-fixes/rt/ws/security/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/ws/security/pom.xml?rev=1298890&r1=1298889&r2=1298890&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/ws/security/pom.xml (original)
+++ cxf/branches/2.5.x-fixes/rt/ws/security/pom.xml Fri Mar 9 15:51:15 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.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java?rev=1298890&r1=1298889&r2=1298890&view=diff
==============================================================================
---
cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
(original)
+++
cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
Fri Mar 9 15:51:15 2012
@@ -139,9 +139,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";
@@ -154,9 +152,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.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=1298890&r1=1298889&r2=1298890&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
Fri Mar 9 15:51:15 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.5.x-fixes/systests/ws-security/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/pom.xml?rev=1298890&r1=1298889&r2=1298890&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/pom.xml (original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/pom.xml Fri Mar 9 15:51:15
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.5.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.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ut/server/server.xml?rev=1298890&r1=1298889&r2=1298890&view=diff
==============================================================================
---
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ut/server/server.xml
(original)
+++
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ut/server/server.xml
Fri Mar 9 15:51:15 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.5.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.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/server/server.xml?rev=1298890&r1=1298889&r2=1298890&view=diff
==============================================================================
---
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/server/server.xml
(original)
+++
cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/server/server.xml
Fri Mar 9 15:51:15 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>