|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.slide.security.SecurityImpl
Security helper.
| Field Summary | |
protected int |
aclInheritanceType
|
protected Logger |
logger
|
protected Namespace |
namespace
Namespace. |
protected NamespaceConfig |
namespaceConfig
Namespace configuration. |
protected java.util.Hashtable |
rolesCache
Roles cache. |
| Constructor Summary | |
SecurityImpl()
Constructor. |
|
SecurityImpl(Namespace namespace,
NamespaceConfig namespaceConfig)
Constructor. |
|
| Method Summary | |
void |
checkCredentials(SlideToken token,
ObjectNode object,
ActionNode action)
Check if the credentials given grants permission to perform the specified action on the specified subject. |
void |
checkPermission(ObjectNode object,
SubjectNode subject,
ActionNode action)
Check whether or not an actor can perform the specified activity on a collection. |
void |
checkPermission(SlideToken token,
ObjectNode object,
ActionNode action)
Check whether or not an actor (principal) can perform the specified activity on the specified resource. |
void |
denyPermission(SlideToken token,
NodePermission permission)
Deny a new permission. |
void |
denyPermission(SlideToken token,
ObjectNode object,
SubjectNode subject,
ActionNode action)
Deny a new permission. |
void |
denyPermission(SlideToken token,
ObjectNode object,
SubjectNode subject,
ActionNode action,
boolean inheritable)
Deny a new permission. |
java.util.Enumeration |
enumeratePermissions(SlideToken token,
ObjectNode object)
Enumerates permissions on an object. |
java.util.Enumeration |
enumeratePermissions(SlideToken token,
ObjectNode object,
boolean includeInherited)
Enumerates permissions on an object. |
java.util.Enumeration |
enumeratePermissions(SlideToken token,
java.lang.String object)
Enumerates permissions on an object. |
java.util.Enumeration |
enumeratePermissions(SlideToken token,
java.lang.String object,
boolean includeInherited)
Enumerates permissions on an object. |
java.util.Map |
getActionAggregation()
Method getActionAggregation |
ObjectNode |
getPrincipal(SlideToken token)
Get the SubjectNode associated with the credentials token. |
java.util.Enumeration |
getRoles(ObjectNode object)
Return the list of roles the specified node has. |
java.util.Enumeration |
getRoles(SlideToken token)
Return the list of roles the specified token has. |
java.util.Enumeration |
getRoles(SlideToken token,
SubjectNode subjectNode)
|
void |
grantPermission(SlideToken token,
NodePermission permission)
Grants a new permission. |
void |
grantPermission(SlideToken token,
ObjectNode object,
SubjectNode subject,
ActionNode action)
Grants a new permission. |
void |
grantPermission(SlideToken token,
ObjectNode object,
SubjectNode subject,
ActionNode action,
boolean inheritable)
Grants a new permission. |
boolean |
hasPermission(ObjectNode object,
SubjectNode subject,
ActionNode action)
Check whether or not an actor can perform the specified activity on a collection. |
boolean |
hasPermission(SlideToken token,
ObjectNode object,
ActionNode action)
Check whether or not an actor (principal) can perform the specified activity on the specified resource. |
boolean |
hasRole(ObjectNode object,
java.lang.String role)
Check whether or not the current user has the specified role. |
boolean |
hasRole(SlideToken token,
java.lang.String role)
Check whether or not the current user has the specified role. |
void |
init(Namespace namespace,
NamespaceConfig namespaceConfig)
initialises the security if it has been loaded via reflection |
boolean |
matchAction(SlideToken token,
ActionNode checkAction,
ActionNode permAction)
Return true, if-and-only-if checkAction matches permAction. |
boolean |
matchPrincipal(SlideToken token,
SubjectNode checkSubject,
SubjectNode matchSubject)
Return true, if-and-only-if checkSubject matches permSubject. |
boolean |
matchPrincipal(SlideToken token,
SubjectNode checkSubject,
SubjectNode matchSubject,
int level)
Return true, if-and-only-if checkSubject matches permSubject. |
java.util.List |
retrieveAclSourceNodes(SlideToken token,
ObjectNode object)
Retrieve the list of object nodes from which to get the ACLs. |
void |
revokePermission(SlideToken token,
NodePermission permission)
Revokes a permission. |
void |
revokePermission(SlideToken token,
ObjectNode object,
SubjectNode subject,
ActionNode action)
Revokes a permission. |
void |
setPermissions(SlideToken token,
java.lang.String object,
java.util.Enumeration permissions)
Set a new set of permissions on an object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Logger logger
protected Namespace namespace
protected NamespaceConfig namespaceConfig
protected java.util.Hashtable rolesCache
protected int aclInheritanceType
| Constructor Detail |
public SecurityImpl()
public SecurityImpl(Namespace namespace,
NamespaceConfig namespaceConfig)
namespace - NamespacenamespaceConfig - Namespace configuration| Method Detail |
public void init(Namespace namespace,
NamespaceConfig namespaceConfig)
Security
init in interface Securitynamespace - NamespacenamespaceConfig - Namespace configuration
public void setPermissions(SlideToken token,
java.lang.String object,
java.util.Enumeration permissions)
throws ServiceAccessException,
ObjectNotFoundException,
AccessDeniedException
setPermissions in interface Securitytoken - Credentials tokenobject - Object on which permission is granted
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSource
AccessDeniedException - Insufficent credentials
public void grantPermission(SlideToken token,
ObjectNode object,
SubjectNode subject,
ActionNode action)
throws ServiceAccessException,
ObjectNotFoundException,
AccessDeniedException,
VetoException
grantPermission in interface Securitytoken - Credentials tokenobject - Object on which permission is grantedsubject - The subject to whom the permission is granted.action - The action which the subject can perform
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSource
AccessDeniedException - Insufficent credentials
VetoException
public void grantPermission(SlideToken token,
ObjectNode object,
SubjectNode subject,
ActionNode action,
boolean inheritable)
throws ServiceAccessException,
ObjectNotFoundException,
AccessDeniedException,
VetoException
grantPermission in interface Securitytoken - Credentials tokenobject - Object on which permission is grantedsubject - Subject who can perform the actionaction - Action which can be performedinheritable - Create an inheritable permission
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSource
AccessDeniedException - Insufficent credentials
VetoException
public void grantPermission(SlideToken token,
NodePermission permission)
throws ServiceAccessException,
ObjectNotFoundException,
AccessDeniedException,
VetoException
grantPermission in interface Securitytoken - Credentials tokenpermission - New permission
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSource
AccessDeniedException - Insufficent credentials
VetoException
public void denyPermission(SlideToken token,
ObjectNode object,
SubjectNode subject,
ActionNode action)
throws ServiceAccessException,
ObjectNotFoundException,
AccessDeniedException,
VetoException
denyPermission in interface Securitytoken - Credentials tokenobject - Object on which permission is deniedsubject - The subject to whom a action is deniedaction - The action which is denied
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSource
AccessDeniedException - Insufficent credentials
VetoException
public void denyPermission(SlideToken token,
ObjectNode object,
SubjectNode subject,
ActionNode action,
boolean inheritable)
throws ServiceAccessException,
ObjectNotFoundException,
AccessDeniedException,
VetoException
denyPermission in interface Securitytoken - Credentials tokenobject - Object on which permission is grantedsubject - Subject who can perform the actionaction - Action which can be performedinheritable - Create an inheritable permission
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSource
AccessDeniedException - Insufficent credentials
VetoException
public void denyPermission(SlideToken token,
NodePermission permission)
throws ServiceAccessException,
ObjectNotFoundException,
AccessDeniedException,
VetoException
denyPermission in interface Securitytoken - Credentials tokenpermission - New permission
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSource
AccessDeniedException - Insufficent credentials
VetoException
public void revokePermission(SlideToken token,
ObjectNode object,
SubjectNode subject,
ActionNode action)
throws ServiceAccessException,
ObjectNotFoundException,
AccessDeniedException,
VetoException
revokePermission in interface Securitytoken - Credentials tokenobject - Object on which permission is revokedsubject - Subject who can perform the actionaction - Action which can be performed
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSource
AccessDeniedException - Insufficent credentials
VetoException
public void revokePermission(SlideToken token,
NodePermission permission)
throws ServiceAccessException,
ObjectNotFoundException,
AccessDeniedException,
VetoException
revokePermission in interface Securitytoken - Credentials tokenpermission - Permission to be removed
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSource
AccessDeniedException - Insufficent credentials
VetoException
public void checkCredentials(SlideToken token,
ObjectNode object,
ActionNode action)
throws ServiceAccessException,
AccessDeniedException
checkCredentials in interface Securitytoken - Credentials tokenobject - Object on which the action is performedaction - Action performed
ServiceAccessException - DataSource access error
AccessDeniedException - The credentials does not grant
the permission to perform the specified action
public void checkPermission(ObjectNode object,
SubjectNode subject,
ActionNode action)
throws ServiceAccessException,
AccessDeniedException,
ObjectNotFoundException
checkPermission in interface Securityobject - Object on which access is testedsubject - Subject who seeks to perform the actionaction - Action which is to be performed
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSource
AccessDeniedException - Insufficent credentials
public void checkPermission(SlideToken token,
ObjectNode object,
ActionNode action)
throws ServiceAccessException,
AccessDeniedException,
ObjectNotFoundException
checkPermission in interface Securitytoken - a SlideTokenobject - Object on which access is testedaction - Action which is to be performed
ServiceAccessException
AccessDeniedException
ObjectNotFoundException
public boolean hasPermission(ObjectNode object,
SubjectNode subject,
ActionNode action)
throws ServiceAccessException,
ObjectNotFoundException
hasPermission in interface Securityobject - Object on which access is testedsubject - Subject who seeks to perform the actionaction - Action which is to be performed
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSource
public boolean hasPermission(SlideToken token,
ObjectNode object,
ActionNode action)
throws ServiceAccessException,
ObjectNotFoundException
hasPermission in interface Securitytoken - a SlideTokenobject - Object on which access is testedaction - Action which is to be performed
ServiceAccessException
ObjectNotFoundException
public java.util.Enumeration enumeratePermissions(SlideToken token,
ObjectNode object)
throws ServiceAccessException,
ObjectNotFoundException,
AccessDeniedException
enumeratePermissions in interface Securitytoken - Credentials tokenobject - Object on which permission is granted
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSource
AccessDeniedException - Insufficent credentials
public java.util.Enumeration enumeratePermissions(SlideToken token,
ObjectNode object,
boolean includeInherited)
throws ServiceAccessException,
ObjectNotFoundException
enumeratePermissions in interface Securitytoken - Credentials tokenobject - Object on which permission is grantedincludeInherited - if true, includes inherited permissions
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSource
AccessDeniedException - Insufficent credentials
public java.util.Enumeration enumeratePermissions(SlideToken token,
java.lang.String object)
throws ServiceAccessException,
ObjectNotFoundException,
AccessDeniedException
enumeratePermissions in interface Securitytoken - Credentials tokenobject - Object on which permission is granted
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSource
AccessDeniedException - Insufficent credentials
public java.util.Enumeration enumeratePermissions(SlideToken token,
java.lang.String object,
boolean includeInherited)
throws ServiceAccessException,
ObjectNotFoundException
enumeratePermissions in interface Securitytoken - Credentials tokenobject - Object on which permission is grantedincludeInherited - if true, includes inherited permissions
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSource
AccessDeniedException - Insufficent credentials
public java.util.List retrieveAclSourceNodes(SlideToken token,
ObjectNode object)
throws ServiceAccessException,
ObjectNotFoundException
token - a SlideTokenobject - an ObjectNode
ServiceAccessException
ObjectNotFoundException
public boolean hasRole(SlideToken token,
java.lang.String role)
throws ServiceAccessException,
ObjectNotFoundException
hasRole in interface Securitytoken - Credentials tokenrole - Role
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSource
public boolean hasRole(ObjectNode object,
java.lang.String role)
throws ServiceAccessException,
ObjectNotFoundException
hasRole in interface Securityobject - Object noderole - Role
ServiceAccessException - DataSource access error
ObjectNotFoundException - Specified object was not found
in the DataSourcepublic java.util.Enumeration getRoles(ObjectNode object)
getRoles in interface Securityobject - Object node
public java.util.Enumeration getRoles(SlideToken token)
throws ServiceAccessException,
ObjectNotFoundException
getRoles in interface Securitytoken - Credentials token
ServiceAccessException
ObjectNotFoundException
public java.util.Enumeration getRoles(SlideToken token,
SubjectNode subjectNode)
throws ServiceAccessException,
ObjectNotFoundException
getRoles in interface SecurityServiceAccessException
ObjectNotFoundException
public ObjectNode getPrincipal(SlideToken token)
throws ServiceAccessException,
ObjectNotFoundException
getPrincipal in interface Securitytoken - a SlideToken
ServiceAccessException
ObjectNotFoundException
public boolean matchAction(SlideToken token,
ActionNode checkAction,
ActionNode permAction)
throws ServiceAccessException
matchAction in interface SecuritycheckAction - the "current" actionpermAction - the action to check against
(from NodePermission or NodeLock)token - a SlideToken
ServiceAccessException
public boolean matchPrincipal(SlideToken token,
SubjectNode checkSubject,
SubjectNode matchSubject)
throws ServiceAccessException
matchPrincipal in interface Securitytoken - a SlideTokencheckSubject - the "current" principalmatchSubject - the principal to check against (e.g. user
or group from NodePermission or NodeLock)
ServiceAccessException
public boolean matchPrincipal(SlideToken token,
SubjectNode checkSubject,
SubjectNode matchSubject,
int level)
throws ServiceAccessException
token - a SlideTokencheckSubject - the "current" principalmatchSubject - the principal to check against (e.g. user
or group from NodePermission or NodeLock)
ServiceAccessExceptionpublic java.util.Map getActionAggregation()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||