|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.security.permissions.AbsPermissionManager
org.objectweb.easybeans.security.permissions.PermissionManager
public class PermissionManager
Permission manager for EJB.
Field Summary | |
---|---|
private java.security.CodeSource |
codeSource
CodeSource. |
private IEJBJarInfo |
ejbJarInfo
EJB-jar Info. |
private JLog |
logger
Logger. |
Constructor Summary | |
---|---|
PermissionManager(java.net.URL contextIdURL,
IEJBJarInfo ejbJarInfo)
Default Constructor. |
Method Summary | |
---|---|
boolean |
checkSecurity(EasyBeansInvocationContext invocationContext,
boolean runAsBean)
Checks the security for the given invocation context. |
private static javax.security.jacc.EJBMethodPermission |
invocationContextToMethodPermission(EasyBeansInvocationContext invocationContext)
Gets a EJBMethodPermission from an invocation context. |
boolean |
isCallerInRole(java.lang.String ejbName,
java.lang.String roleName,
boolean inRunAs)
Test if the caller has a given role. |
protected void |
translateEjbExcludeList(ISecurityInfo securityInfo)
3.1.5.2 Translating the EJB exclude-list An EJBMethodPermission object must be created for each method element occurring in the exclude-list element of the deployment descriptor. |
protected void |
translateEjbMethodPermission(ISecurityInfo securityInfo)
3.1.5.1 Translating EJB method-permission Elements For each method element of each method-permission element, an EJBMethodPermission object translated from the method element must be added to the policy statements of the PolicyConfiguration object. |
void |
translateEjbSecurityRoleRef(IBeanInfo beanInfo,
ISecurityInfo securityInfo)
3.1.5.3 Translating EJB security-role-ref Elements For each security-role-ref element appearing in the deployment descriptor, a corresponding EJBRoleRefPermission must be created. |
void |
translateMetadata()
3.1.5 Translating EJB Deployment Descriptors A reference to a PolicyConfiguration object must be obtained by calling the getPolicyConfiguration method on the PolicyConfigurationFactory implementation class of the provider configured into the container. |
Methods inherited from class org.objectweb.easybeans.security.permissions.AbsPermissionManager |
---|
commit, delete, getContextId, getContextIdURL, getPolicy, getPolicyConfiguration, setContextId, setPolicyConfiguration |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.easybeans.api.EZBPermissionManager |
---|
commit |
Field Detail |
---|
private JLog logger
private java.security.CodeSource codeSource
private IEJBJarInfo ejbJarInfo
Constructor Detail |
---|
public PermissionManager(java.net.URL contextIdURL, IEJBJarInfo ejbJarInfo) throws PermissionManagerException
contextIdURL
- context ID used for PolicyContextejbJarInfo
- the metadata on all the beans (runtime info)
PermissionManagerException
- if permissions can't be setMethod Detail |
---|
public void translateMetadata() throws PermissionManagerException
translateMetadata
in interface EZBPermissionManager
PermissionManagerException
- if permissions can't be setprotected void translateEjbMethodPermission(ISecurityInfo securityInfo) throws PermissionManagerException
securityInfo
- the security info for a given bean.
PermissionManagerException
- if permissions can't be setprotected void translateEjbExcludeList(ISecurityInfo securityInfo) throws PermissionManagerException
securityInfo
- the security info for a given bean.
PermissionManagerException
- if permissions can't be setpublic void translateEjbSecurityRoleRef(IBeanInfo beanInfo, ISecurityInfo securityInfo) throws PermissionManagerException
beanInfo
- info about the bean.securityInfo
- the security info for a given bean.
PermissionManagerException
- if permissions can't be setpublic boolean checkSecurity(EasyBeansInvocationContext invocationContext, boolean runAsBean)
checkSecurity
in interface EZBPermissionManager
invocationContext
- the context to check.runAsBean
- if true, the bean is a run-as bean.
private static javax.security.jacc.EJBMethodPermission invocationContextToMethodPermission(EasyBeansInvocationContext invocationContext)
invocationContext
- the context containing data on the current
invocation.
public boolean isCallerInRole(java.lang.String ejbName, java.lang.String roleName, boolean inRunAs)
isCallerInRole
in interface EZBPermissionManager
ejbName
- The name of the EJB on wich look roleroleName
- The name of the security role. The role must be one of
the security-role-ref that is defined in the deployment
descriptor.inRunAs
- bean calling this method is running in run-as mode or not ?
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |