Package org.jboss.security.javaee
Class AbstractEJBAuthorizationHelper
- java.lang.Object
-
- org.jboss.security.javaee.AbstractJavaEEHelper
-
- org.jboss.security.javaee.AbstractEJBAuthorizationHelper
-
- Direct Known Subclasses:
EJBAuthorizationHelper
public abstract class AbstractEJBAuthorizationHelper extends AbstractJavaEEHelper
EJB Authorization Helper- Since:
- Apr 17, 2008
- Version:
- $Revision$
- Author:
- Anil.Saldhana@redhat.com
-
-
Field Summary
Fields Modifier and Type Field Description protected String
version
-
Fields inherited from class org.jboss.security.javaee.AbstractJavaEEHelper
policyRegistration, securityContext
-
-
Constructor Summary
Constructors Constructor Description AbstractEJBAuthorizationHelper()
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description abstract boolean
authorize(String ejbName, Method ejbMethod, Principal ejbPrincipal, String invocationInterfaceString, CodeSource ejbCS, Subject callerSubject, RunAs callerRunAs, String contextID, RoleGroup methodRoles)
Deprecated.abstract boolean
authorize(Resource resource)
Authorize the EJBabstract String
getEJBVersion()
Get the EJB Versionabstract boolean
isCallerInRole(String roleName, String ejbName, Principal ejbPrincipal, Subject callerSubject, String contextID, Set<SecurityRoleRef> securityRoleRefs)
Deprecated.abstract boolean
isCallerInRole(String roleName, String ejbName, Principal ejbPrincipal, Subject callerSubject, String contextID, Set<SecurityRoleRef> securityRoleRefs, boolean enforceEJBRestrictions)
Deprecated.abstract boolean
isCallerInRole(Resource resource, String roleName)
Check if the caller is in any of the rolesabstract void
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
-
version
protected String version
-
-
Method Detail
-
getEJBVersion
public abstract String getEJBVersion()
Get the EJB Version- Returns:
-
setEJBVersion
public abstract void setEJBVersion(String ejbVersion)
Set the EJB Version- Parameters:
ejbVersion
-
-
authorize
public abstract boolean authorize(Resource resource) throws WrongEEResourceException
Authorize the EJB- Parameters:
resource
-- Returns:
- Throws:
WrongEEResourceException
-
authorize
public abstract boolean authorize(String ejbName, Method ejbMethod, Principal ejbPrincipal, String invocationInterfaceString, CodeSource ejbCS, Subject callerSubject, RunAs callerRunAs, String contextID, RoleGroup methodRoles)
Deprecated.Authorize the EJB Invocation- Parameters:
ejbName
-ejbMethod
-ejbPrincipal
-invocationInterfaceString
-ejbCS
-callerSubject
-callerRunAs
-contextID
-methodRoles
-- Returns:
- true - subject is authorized
- Throws:
IllegalStateException
- Authorization Manager from SecurityContext is nullIllegalArgumentException
- ejbName, ejbMethod, ejbCS or contextID is null- See Also:
authorize(Resource)
-
isCallerInRole
public abstract boolean isCallerInRole(Resource resource, String roleName) throws WrongEEResourceException, MissingArgumentsException
Check if the caller is in any of the roles- Parameters:
roleName
-ejbName
-ejbPrincipal
-callerSubject
-contextID
-securityRoleRefs
-- Returns:
- true - caller is in the role
- Throws:
WrongEEResourceException
- when resource is not EJB ResourceMissingArgumentsException
- roleName, ejbName or contextID is null
-
isCallerInRole
public abstract boolean isCallerInRole(String roleName, String ejbName, Principal ejbPrincipal, Subject callerSubject, String contextID, Set<SecurityRoleRef> securityRoleRefs)
Deprecated.Check if the caller is in any of the roles- Parameters:
roleName
-ejbName
-ejbPrincipal
-callerSubject
-contextID
-securityRoleRefs
-- Returns:
- true - caller is in the role
- Throws:
IllegalStateException
- Authorization Manager from SecurityContext is nullIllegalArgumentException
- roleName, ejbName, contextID is null- See Also:
isCallerInRole(Resource, String)
-
isCallerInRole
public abstract boolean isCallerInRole(String roleName, String ejbName, Principal ejbPrincipal, Subject callerSubject, String contextID, Set<SecurityRoleRef> securityRoleRefs, boolean enforceEJBRestrictions)
Deprecated.Enforce EJB 1.1 restrictions that the role being checked has to be in the deployment descriptor- Parameters:
roleName
-ejbName
-ejbPrincipal
-callerSubject
-contextID
-securityRoleRefs
-enforceEJBRestrictions
-- Returns:
- true - caller is in the role
- Throws:
IllegalStateException
- Authorization Manager from SecurityContext is nullIllegalArgumentException
- roleName, ejbName, contextID is null- See Also:
isCallerInRole(Resource, String)
-
-