Interface OSecurityInternal
- All Known Implementing Classes:
OSecurityRemote,OSecurityShared,OSymmetricKeySecurity
public interface OSecurityInternal
-
Method Summary
Modifier and TypeMethodDescriptionallowIdentity(ODatabaseSession session, ODocument iDocument, String iAllowFieldName, OIdentifiable iId) Deprecated.allowRole(ODatabaseSession session, ODocument iDocument, ORestrictedOperation iOperationType, String iRoleName) Deprecated.allowUser(ODatabaseSession session, ODocument iDocument, ORestrictedOperation iOperationType, String iUserName) Deprecated.authenticate(ODatabaseSession session, OToken authToken) authenticate(ODatabaseSession session, String iUsername, String iUserPassword) booleancanCreate(ODatabaseSession session, ORecord record) booleancanDelete(ODatabaseSession session, ORecord record) booleancanExecute(ODatabaseSession session, OFunction function) booleancanRead(ODatabaseSession session, ORecord record) booleancanUpdate(ODatabaseSession session, ORecord record) voidclose()create(ODatabaseSession session) voidcreateClassTrigger(ODatabaseSession session) createRole(ODatabaseSession session, String iRoleName, ORole iParent, OSecurityRole.ALLOW_MODES iAllowMode) createRole(ODatabaseSession session, String iRoleName, OSecurityRole.ALLOW_MODES iAllowMode) createSecurityPolicy(ODatabaseSession session, String name) creates and saves an empty security policycreateUser(ODatabaseSession session, String iUserName, String iUserPassword, ORole[] iRoles) createUser(ODatabaseSession session, String iUserName, String iUserPassword, String[] iRoles) voiddeleteSecurityPolicy(ODatabaseSession session, String name) denyRole(ODatabaseSession session, ODocument iDocument, ORestrictedOperation iOperationType, String iRoleName) Deprecated.denyUser(ODatabaseSession session, ODocument iDocument, ORestrictedOperation iOperationType, String iUserName) Deprecated.disallowIdentity(ODatabaseSession session, ODocument iDocument, String iAllowFieldName, OIdentifiable iId) Deprecated.booleandropRole(ODatabaseSession session, String iRoleName) booleandropUser(ODatabaseSession session, String iUserName) returns the list of all the filtered properties (for any role defined in the db)getAllRoles(ODatabaseSession session) getAllUsers(ODatabaseSession session) getFilteredProperties(ODatabaseSession session, ODocument document) For property-level security.getRole(ODatabaseSession session, OIdentifiable iRoleRid) getRole(ODatabaseSession session, String iRoleName) getSecurityPolicies(ODatabaseSession session, OSecurityRole role) getSecurityPolicy(ODatabaseSession session, OSecurityRole role, String resource) Returns the security policy policy assigned to a role for a specific resource (not recursive on superclasses, nor on role hierarchy)getSecurityPolicy(ODatabaseSession session, String name) getUser(ODatabaseSession session, ORID userId) getUser(ODatabaseSession session, String iUserName) longgetVersion(ODatabaseSession session) voidincrementVersion(ODatabaseSession session) booleanisAllowed(ODatabaseSession session, Set<OIdentifiable> iAllowAll, Set<OIdentifiable> iAllowOperation) booleanisAllowedWrite(ODatabaseSession session, ODocument document, String propertyName) For property-level securitybooleanisReadRestrictedBySecurityPolicy(ODatabaseSession session, String resource) checks if for current session a resource is restricted by security resources (ie.voidload(ODatabaseSession session) voidremoveSecurityPolicy(ODatabaseSession session, ORole role, String resource) Removes security policy bound to a role for a specific resourcevoidsaveSecurityPolicy(ODatabaseSession session, OSecurityPolicyImpl policy) securityAuthenticate(ODatabaseSession session, OAuthenticationInfo authenticationInfo) securityAuthenticate(ODatabaseSession session, String userName, String password) voidsetSecurityPolicy(ODatabaseSession session, OSecurityRole role, String resource, OSecurityPolicyImpl policy) Sets a security policy for a specific resource on a role
-
Method Details
-
isAllowed
boolean isAllowed(ODatabaseSession session, Set<OIdentifiable> iAllowAll, Set<OIdentifiable> iAllowOperation) -
allowUser
@Deprecated OIdentifiable allowUser(ODatabaseSession session, ODocument iDocument, ORestrictedOperation iOperationType, String iUserName) Deprecated. -
allowRole
@Deprecated OIdentifiable allowRole(ODatabaseSession session, ODocument iDocument, ORestrictedOperation iOperationType, String iRoleName) Deprecated. -
denyUser
@Deprecated OIdentifiable denyUser(ODatabaseSession session, ODocument iDocument, ORestrictedOperation iOperationType, String iUserName) Deprecated. -
denyRole
@Deprecated OIdentifiable denyRole(ODatabaseSession session, ODocument iDocument, ORestrictedOperation iOperationType, String iRoleName) Deprecated. -
allowIdentity
@Deprecated OIdentifiable allowIdentity(ODatabaseSession session, ODocument iDocument, String iAllowFieldName, OIdentifiable iId) Deprecated. -
disallowIdentity
@Deprecated OIdentifiable disallowIdentity(ODatabaseSession session, ODocument iDocument, String iAllowFieldName, OIdentifiable iId) Deprecated. -
authenticate
-
createUser
-
createUser
-
authenticate
-
createRole
ORole createRole(ODatabaseSession session, String iRoleName, ORole iParent, OSecurityRole.ALLOW_MODES iAllowMode) -
createRole
-
getUser
-
getUser
-
getRole
-
getRole
-
getAllUsers
-
getAllRoles
-
getSecurityPolicies
-
getSecurityPolicy
Returns the security policy policy assigned to a role for a specific resource (not recursive on superclasses, nor on role hierarchy)- Parameters:
session- an active DB sessionrole- the roleresource- the string representation of the security resource, eg. "database.class.Person"- Returns:
-
setSecurityPolicy
void setSecurityPolicy(ODatabaseSession session, OSecurityRole role, String resource, OSecurityPolicyImpl policy) Sets a security policy for a specific resource on a role- Parameters:
session- a valid db session to perform the operation (that has permissions to do it)role- The roleresource- the string representation of the security resource, eg. "database.class.Person"policy- The security policy
-
createSecurityPolicy
creates and saves an empty security policy- Parameters:
session- the session to a DB where the policy has to be createdname- the policy name- Returns:
-
getSecurityPolicy
-
saveSecurityPolicy
-
deleteSecurityPolicy
-
removeSecurityPolicy
Removes security policy bound to a role for a specific resource- Parameters:
session- A valid db session to perform the operationrole- the roleresource- the string representation of the security resource, eg. "database.class.Person"
-
dropUser
-
dropRole
-
createClassTrigger
-
getVersion
-
incrementVersion
-
create
-
load
-
close
void close() -
getFilteredProperties
For property-level security. Returns the list of the properties that are hidden (ie. not allowed to be read) for current session, regarding a specific document- Parameters:
session- the db sessiondocument- the document to filter- Returns:
- the list of the properties that are hidden (ie. not allowed to be read) on current document for current session
-
isAllowedWrite
For property-level security- Parameters:
session-document- current document to check for proeprty-level securitypropertyName- the property to check for write access- Returns:
-
canCreate
-
canRead
-
canUpdate
-
canDelete
-
canExecute
-
isReadRestrictedBySecurityPolicy
checks if for current session a resource is restricted by security resources (ie. READ policies exist, with predicate different from "TRUE", to access the given resource- Parameters:
session- The session to check for the existece of policiesresource- a resource string, eg. "database.class.Person"- Returns:
- true if a restriction of any type exists for this session and this resource. False otherwise
-
getAllFilteredProperties
returns the list of all the filtered properties (for any role defined in the db)- Parameters:
database-- Returns:
-
securityAuthenticate
-
securityAuthenticate
OSecurityUser securityAuthenticate(ODatabaseSession session, OAuthenticationInfo authenticationInfo)
-