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 StringPOLICY_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 booleanauthorize(String ejbName, Method ejbMethod, Principal ejbPrincipal, String invocationInterfaceString, CodeSource ejbCodeSource, Subject callerSubject, RunAs callerRunAs, String contextID, RoleGroup methodRoles)Authorize the EJB Invocationbooleanauthorize(Resource resource)Authorize the EJBStringgetEJBVersion()Get the EJB VersionbooleanisCallerInRole(String roleName, String ejbName, Principal ejbPrincipal, Subject callerSubject, String contextID, Set<SecurityRoleRef> securityRoleRefs)Check if the caller is in any of the rolesbooleanisCallerInRole(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 descriptorbooleanisCallerInRole(Resource resource, String roleName)Check if the caller is in any of the rolesvoidsetEJBVersion(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:AbstractEJBAuthorizationHelperAuthorize the EJB Invocation- Specified by:
authorizein 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:AbstractEJBAuthorizationHelperCheck if the caller is in any of the roles- Specified by:
isCallerInRolein 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:AbstractEJBAuthorizationHelperCheck if the caller is in any of the roles- Specified by:
isCallerInRolein 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:AbstractEJBAuthorizationHelperEnforce EJB 1.1 restrictions that the role being checked has to be in the deployment descriptor- Specified by:
isCallerInRolein classAbstractEJBAuthorizationHelper- Returns:
- true - caller is in the role
- See Also:
AbstractEJBAuthorizationHelper.isCallerInRole(Resource, String)
-
getEJBVersion
public String getEJBVersion()
Description copied from class:AbstractEJBAuthorizationHelperGet the EJB Version- Specified by:
getEJBVersionin classAbstractEJBAuthorizationHelper- Returns:
-
setEJBVersion
public void setEJBVersion(String ejbVersion)
Description copied from class:AbstractEJBAuthorizationHelperSet the EJB Version- Specified by:
setEJBVersionin classAbstractEJBAuthorizationHelper
-
authorize
public boolean authorize(Resource resource) throws WrongEEResourceException, MissingArgumentsException
Description copied from class:AbstractEJBAuthorizationHelperAuthorize the EJB- Specified by:
authorizein classAbstractEJBAuthorizationHelper- Returns:
- Throws:
WrongEEResourceExceptionMissingArgumentsException
-
-