[jboss-cvs] JBossAS SVN: r80275 - projects/security/security-spi/trunk/spi/src/main/org/jboss/security/javaee.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 30 14:38:11 EDT 2008
Author: anil.saldhana at jboss.com
Date: 2008-10-30 14:38:11 -0400 (Thu, 30 Oct 2008)
New Revision: 80275
Modified:
projects/security/security-spi/trunk/spi/src/main/org/jboss/security/javaee/AbstractEJBAuthorizationHelper.java
Log:
SECURITY-299: ejb authorization helper needs to be aware of ejb version
Modified: projects/security/security-spi/trunk/spi/src/main/org/jboss/security/javaee/AbstractEJBAuthorizationHelper.java
===================================================================
--- projects/security/security-spi/trunk/spi/src/main/org/jboss/security/javaee/AbstractEJBAuthorizationHelper.java 2008-10-30 17:43:34 UTC (rev 80274)
+++ projects/security/security-spi/trunk/spi/src/main/org/jboss/security/javaee/AbstractEJBAuthorizationHelper.java 2008-10-30 18:38:11 UTC (rev 80275)
@@ -40,6 +40,33 @@
public abstract class AbstractEJBAuthorizationHelper
extends AbstractJavaEEHelper
{
+ protected String version;
+
+ /**
+ * Get the EJB Version
+ * @return
+ */
+ public abstract String getEJBVersion();
+
+ /**
+ * Set the EJB Version
+ * @param ejbVersion
+ */
+ public abstract void setEJBVersion(String ejbVersion);
+
+ /**
+ * Authorize the EJB Invocation
+ * @param ejbName
+ * @param ejbMethod
+ * @param ejbPrincipal
+ * @param invocationInterfaceString
+ * @param ejbCS
+ * @param callerSubject
+ * @param callerRunAs
+ * @param contextID
+ * @param methodRoles
+ * @return
+ */
public abstract boolean authorize(String ejbName,
Method ejbMethod,
Principal ejbPrincipal,
@@ -50,10 +77,41 @@
String contextID,
RoleGroup methodRoles);
+ /**
+ * Check if the caller is in any of the roles
+ * @param roleName
+ * @param ejbName
+ * @param ejbPrincipal
+ * @param callerSubject
+ * @param contextID
+ * @param securityRoleRefs
+ * @return
+ */
public abstract boolean isCallerInRole(String roleName,
String ejbName,
Principal ejbPrincipal,
Subject callerSubject,
String contextID,
Set<SecurityRoleRef> securityRoleRefs);
+
+
+ /**
+ * Enforce EJB 1.1 restrictions that the role being
+ * checked has to be in the deployment descriptor
+ * @param roleName
+ * @param ejbName
+ * @param ejbPrincipal
+ * @param callerSubject
+ * @param contextID
+ * @param securityRoleRefs
+ * @param enforceEJBRestrictions
+ * @return
+ */
+ public abstract boolean isCallerInRole(String roleName,
+ String ejbName,
+ Principal ejbPrincipal,
+ Subject callerSubject,
+ String contextID,
+ Set<SecurityRoleRef> securityRoleRefs,
+ boolean enforceEJBRestrictions);
}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list