cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1492125 - in /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security: SecurityConstants.java wss4j/PolicyBasedWSS4JStaxInInterceptor.java wss4j/WSS4JInInterceptor.java
Date Wed, 12 Jun 2013 09:21:58 GMT
Author: coheigea
Date: Wed Jun 12 09:21:57 2013
New Revision: 1492125

URL: http://svn.apache.org/r1492125
Log:
Fixing build

Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java?rev=1492125&r1=1492124&r2=1492125&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
Wed Jun 12 09:21:57 2013
@@ -71,6 +71,12 @@ public final class SecurityConstants {
      */
     public static final String ENCRYPT_USERNAME = "ws-security.encryption.username";
     
+    /**
+     * The actor or role name of the wsse:Security header. If this parameter 
+     * is omitted, the actor name is not set.
+     */
+    public static final String ACTOR = "ws-security.actor";
+    
     //
     // Callback class and Crypto properties
     //
@@ -451,7 +457,7 @@ public final class SecurityConstants {
     
     static {
         Set<String> s = new HashSet<String>(Arrays.asList(new String[] {
-            USERNAME, PASSWORD, SIGNATURE_USERNAME, ENCRYPT_USERNAME,
+            USERNAME, PASSWORD, SIGNATURE_USERNAME, ENCRYPT_USERNAME, ACTOR,
             CALLBACK_HANDLER, SAML_CALLBACK_HANDLER, SIGNATURE_PROPERTIES, 
             SIGNATURE_CRYPTO, ENCRYPT_PROPERTIES, ENCRYPT_CRYPTO,
             VALIDATE_TOKEN, ENABLE_REVOCATION, ALWAYS_ENCRYPT_UT, IS_BSP_COMPLIANT, 

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java?rev=1492125&r1=1492124&r2=1492125&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
Wed Jun 12 09:21:57 2013
@@ -451,9 +451,10 @@ public class PolicyBasedWSS4JStaxInInter
             soapAction = "";
         }
         
+        String actor = (String)msg.getContextualProperty(SecurityConstants.ACTOR);
         final List<SecurityEvent> incomingSecurityEventList = new LinkedList<SecurityEvent>();
         PolicyEnforcer securityEventListener = 
-            new PolicyEnforcer(operationPolicies, soapAction, isRequestor(msg)) {
+            new PolicyEnforcer(operationPolicies, soapAction, isRequestor(msg), actor) {
             
                 @Override
                 public void registerSecurityEvent(SecurityEvent securityEvent) throws WSSecurityException
{

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java?rev=1492125&r1=1492124&r2=1492125&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Wed Jun 12 09:21:57 2013
@@ -226,6 +226,9 @@ public class WSS4JInInterceptor extends 
             int doAction = WSSecurityUtil.decodeAction(action, actions);
 
             String actor = (String)getOption(WSHandlerConstants.ACTOR);
+            if (actor == null) {
+                actor = (String)msg.getContextualProperty(SecurityConstants.ACTOR);
+            }
 
             reqData.setCallbackHandler(getCallback(reqData, doAction, utWithCallbacks));
             



Mime
View raw message