cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1485794 - in /cxf/branches/2.7.x-fixes/rt: core/src/main/java/org/apache/cxf/interceptor/security/DefaultSecurityContext.java ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Date Thu, 23 May 2013 18:10:12 GMT
Author: coheigea
Date: Thu May 23 18:10:12 2013
New Revision: 1485794

URL: http://svn.apache.org/r1485794
Log:
Merged revisions 1485776 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1485776 | coheigea | 2013-05-23 17:43:14 +0100 (Thu, 23 May 2013) | 2 lines

  [CXF-5037] - DefaultSecurityContext Principal is incorrectly set from Subject

........

Modified:
    cxf/branches/2.7.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/security/DefaultSecurityContext.java
    cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java

Modified: cxf/branches/2.7.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/security/DefaultSecurityContext.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/security/DefaultSecurityContext.java?rev=1485794&r1=1485793&r2=1485794&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/security/DefaultSecurityContext.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/security/DefaultSecurityContext.java
Thu May 23 18:10:12 2013
@@ -48,6 +48,9 @@ public class DefaultSecurityContext impl
     public DefaultSecurityContext(Principal p, Subject subject) {
         this.p = p;
         this.subject = subject;
+        if (p == null) {
+            this.p = findPrincipal(subject);
+        }
     }
     
     private static Principal findPrincipal(Subject subject) {

Modified: cxf/branches/2.7.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.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java?rev=1485794&r1=1485793&r2=1485794&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Thu May 23 18:10:12 2013
@@ -489,7 +489,7 @@ public class WSS4JInInterceptor extends 
                         new RolePrefixSecurityContextImpl(subject, roleClassifier, roleClassifierType)
                     );
                 } else {
-                    msg.put(SecurityContext.class, new DefaultSecurityContext(subject));
+                    msg.put(SecurityContext.class, new DefaultSecurityContext(p, subject));
                 }
                 break;
             } else if (p != null && isSecurityContextPrincipal(p, wsResult)) {



Mime
View raw message