Class EJBAuthorizationHelper
- java.lang.Object
-
- org.jboss.security.javaee.AbstractJavaEEHelper
-
- org.jboss.security.javaee.AbstractEJBAuthorizationHelper
-
- org.jboss.security.plugins.javaee.EJBAuthorizationHelper
-
public class EJBAuthorizationHelper extends AbstractEJBAuthorizationHelper
Default implementation of the EJBAuthorizationHelper- Since:
- Apr 18, 2008
- Version:
- $Revision$
- Author:
- Anil.Saldhana@redhat.com
-
-
Field Summary
Fields Modifier and Type Field Description protected String
POLICY_REGISTRATION_JNDI
-
Fields inherited from class org.jboss.security.javaee.AbstractEJBAuthorizationHelper
version
-
Fields inherited from class org.jboss.security.javaee.AbstractJavaEEHelper
policyRegistration, securityContext
-
-
Constructor Summary
Constructors Constructor Description EJBAuthorizationHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
authorize(String ejbName, Method ejbMethod, Principal ejbPrincipal, String invocationInterfaceString, CodeSource ejbCodeSource, Subject callerSubject, RunAs callerRunAs, String contextID, RoleGroup methodRoles)
Authorize the EJB Invocationboolean
authorize(Resource resource)
Authorize the EJBString
getEJBVersion()
Get the EJB Versionboolean
isCallerInRole(String roleName, String ejbName, Principal ejbPrincipal, Subject callerSubject, String contextID, Set<SecurityRoleRef> securityRoleRefs)
Check if the caller is in any of the rolesboolean
isCallerInRole(String roleName, String ejbName, Principal ejbPrincipal, Subject callerSubject, String contextID, Set<SecurityRoleRef> securityRoleRefs, boolean enforceEJBRestrictions)
Enforce EJB 1.1 restrictions that the role being checked has to be in the deployment descriptorboolean
isCallerInRole(Resource resource, String roleName)
Check if the caller is in any of the rolesvoid
setEJBVersion(String ejbVersion)
Set the EJB Version-
Methods inherited from class org.jboss.security.javaee.AbstractJavaEEHelper
audit, authenticationAudit, authorizationAudit, getCallerPrincipal, getContextMap, getPolicyRegistration, getSecurityContext, setPolicyRegistration, setSecurityContext
-
-
-
-
Field Detail
-
POLICY_REGISTRATION_JNDI
protected String POLICY_REGISTRATION_JNDI
-
-
Method Detail
-
authorize
public boolean authorize(String ejbName, Method ejbMethod, Principal ejbPrincipal, String invocationInterfaceString, CodeSource ejbCodeSource, Subject callerSubject, RunAs callerRunAs, String contextID, RoleGroup methodRoles)
Description copied from class:AbstractEJBAuthorizationHelper
Authorize the EJB Invocation- Specified by:
authorize
in classAbstractEJBAuthorizationHelper
- Returns:
- true - subject is authorized
- See Also:
AbstractEJBAuthorizationHelper.authorize(Resource)
-
isCallerInRole
public boolean isCallerInRole(String roleName, String ejbName, Principal ejbPrincipal, Subject callerSubject, String contextID, Set<SecurityRoleRef> securityRoleRefs)
Description copied from class:AbstractEJBAuthorizationHelper
Check if the caller is in any of the roles- Specified by:
isCallerInRole
in classAbstractEJBAuthorizationHelper
- Returns:
- true - caller is in the role
- See Also:
AbstractEJBAuthorizationHelper.isCallerInRole(Resource, String)
-
isCallerInRole
public boolean isCallerInRole(Resource resource, String roleName) throws WrongEEResourceException, MissingArgumentsException
Description copied from class:AbstractEJBAuthorizationHelper
Check if the caller is in any of the roles- Specified by:
isCallerInRole
in classAbstractEJBAuthorizationHelper
- Returns:
- true - caller is in the role
- Throws:
WrongEEResourceException
- when resource is not EJB ResourceMissingArgumentsException
- roleName, ejbName or contextID is null
-
isCallerInRole
public boolean isCallerInRole(String roleName, String ejbName, Principal ejbPrincipal, Subject callerSubject, String contextID, Set<SecurityRoleRef> securityRoleRefs, boolean enforceEJBRestrictions)
Description copied from class:AbstractEJBAuthorizationHelper
Enforce EJB 1.1 restrictions that the role being checked has to be in the deployment descriptor- Specified by:
isCallerInRole
in classAbstractEJBAuthorizationHelper
- Returns:
- true - caller is in the role
- See Also:
AbstractEJBAuthorizationHelper.isCallerInRole(Resource, String)
-
getEJBVersion
public String getEJBVersion()
Description copied from class:AbstractEJBAuthorizationHelper
Get the EJB Version- Specified by:
getEJBVersion
in classAbstractEJBAuthorizationHelper
- Returns:
-
setEJBVersion
public void setEJBVersion(String ejbVersion)
Description copied from class:AbstractEJBAuthorizationHelper
Set the EJB Version- Specified by:
setEJBVersion
in classAbstractEJBAuthorizationHelper
-
authorize
public boolean authorize(Resource resource) throws WrongEEResourceException, MissingArgumentsException
Description copied from class:AbstractEJBAuthorizationHelper
Authorize the EJB- Specified by:
authorize
in classAbstractEJBAuthorizationHelper
- Returns:
- Throws:
WrongEEResourceException
MissingArgumentsException
-
-