cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject git commit: Allow security errors to be returned if we are the message initiator
Date Wed, 26 Mar 2014 16:50:22 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 0048c8fa2 -> 78d5199f0


Allow security errors to be returned if we are the message initiator


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/78d5199f
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/78d5199f
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/78d5199f

Branch: refs/heads/master
Commit: 78d5199f06f0206b724166c80976baf30f5c3bf6
Parents: 0048c8f
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed Mar 26 16:49:57 2014 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed Mar 26 16:49:57 2014 +0000

----------------------------------------------------------------------
 .../java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java | 2 +-
 .../org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/78d5199f/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
index 2d00d8b..c9eac0e 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
@@ -798,7 +798,7 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor {
         String errorMessage = null;
         boolean returnSecurityError = 
             MessageUtils.getContextualBoolean(message, SecurityConstants.RETURN_SECURITY_ERROR,
false);
-        if (returnSecurityError) {
+        if (returnSecurityError || MessageUtils.isRequestor(message)) {
             errorMessage = e.getMessage();
         } else {
             errorMessage = e.getSafeExceptionMessage();

http://git-wip-us.apache.org/repos/asf/cxf/blob/78d5199f/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
index 2f3d1db..b2e540f 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
@@ -131,7 +131,8 @@ public class WSS4JStaxInInterceptor extends AbstractWSS4JStaxInterceptor
{
             List<SecurityEventListener> securityEventListeners = 
                 configureSecurityEventListeners(soapMessage, secProps);
             
-            InboundWSSec inboundWSSec = WSSec.getInboundWSSec(secProps);
+            InboundWSSec inboundWSSec = 
+                WSSec.getInboundWSSec(secProps, MessageUtils.isRequestor(soapMessage));
             
             newXmlStreamReader = 
                 inboundWSSec.processInMessage(originalXmlStreamReader, requestSecurityEvents,
securityEventListeners);


Mime
View raw message