[jboss-cvs] JBossAS SVN: r112438 - branches/JBPAPP_5_1_1_GA_JBPAPP-7474/server/src/main/org/jboss/ejb/plugins.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Nov 7 16:13:47 EST 2011
Author: dehort
Date: 2011-11-07 16:13:47 -0500 (Mon, 07 Nov 2011)
New Revision: 112438
Modified:
branches/JBPAPP_5_1_1_GA_JBPAPP-7474/server/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java
Log:
Checking in a possible fix for the situation where the EJB 2 SecurityInterceptor is trimming off the RunAs identity
[JBPAPP-7474]
Modified: branches/JBPAPP_5_1_1_GA_JBPAPP-7474/server/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java
===================================================================
--- branches/JBPAPP_5_1_1_GA_JBPAPP-7474/server/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java 2011-11-07 20:59:43 UTC (rev 112437)
+++ branches/JBPAPP_5_1_1_GA_JBPAPP-7474/server/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java 2011-11-07 21:13:47 UTC (rev 112438)
@@ -378,6 +378,10 @@
boolean containerMethod = m == null || m.equals(ejbTimeout);
if (containerMethod == true || securityManager == null || container == null)
{
+ SecurityContext sc = SecurityActions.getSecurityContext();
+ if (sc != null)
+ return true;
+
// Allow for the propagation of caller info to other beans
SecurityActions.createAndSetSecurityContext(mi.getPrincipal(), mi.getCredential(), "BYPASSED-SECURITY");
if (this.runAsIdentity != null)
@@ -392,4 +396,4 @@
RunAs incomingRunAs = sc.getIncomingRunAs();
return incomingRunAs != null && incomingRunAs instanceof RunAsIdentity;
}
-}
\ No newline at end of file
+}
More information about the jboss-cvs-commits
mailing list