Index: SecurityActions.java =================================================================== --- SecurityActions.java (revision 74998) +++ SecurityActions.java (working copy) @@ -28,6 +28,7 @@ import java.security.PrivilegedExceptionAction; import org.jboss.security.RunAs; +import org.jboss.security.SecurityAssociation; import org.jboss.security.SecurityContext; import org.jboss.security.SecurityContextFactory; import org.jboss.security.SecurityContextAssociation; @@ -53,14 +54,15 @@ SecurityActions NON_PRIVILEGED = new SecurityActions() { public Principal getPrincipal() - { - //return SecurityAssociation.getPrincipal(); + { Principal p = null; SecurityContext sc = SecurityContextAssociation.getSecurityContext(); if(sc != null) { p = sc.getUtil().getUserPrincipal(); } + if(p == null && SecurityContextAssociation.isClient()) + p = SecurityAssociation.getPrincipal(); return p; } @@ -73,6 +75,8 @@ { cred = sc.getUtil().getCredential(); } + if(cred == null && SecurityContextAssociation.isClient()) + cred = SecurityAssociation.getCredential(); return cred; }