public interface OSecurityInternal
boolean isAllowed(ODatabaseSession session, Set<OIdentifiable> iAllowAll, Set<OIdentifiable> iAllowOperation)
OIdentifiable allowUser(ODatabaseSession session, ODocument iDocument, ORestrictedOperation iOperationType, String iUserName)
OIdentifiable allowRole(ODatabaseSession session, ODocument iDocument, ORestrictedOperation iOperationType, String iRoleName)
OIdentifiable denyUser(ODatabaseSession session, ODocument iDocument, ORestrictedOperation iOperationType, String iUserName)
OIdentifiable denyRole(ODatabaseSession session, ODocument iDocument, ORestrictedOperation iOperationType, String iRoleName)
OIdentifiable allowIdentity(ODatabaseSession session, ODocument iDocument, String iAllowFieldName, OIdentifiable iId)
OIdentifiable disallowIdentity(ODatabaseSession session, ODocument iDocument, String iAllowFieldName, OIdentifiable iId)
OUser authenticate(ODatabaseSession session, String iUsername, String iUserPassword)
OUser createUser(ODatabaseSession session, String iUserName, String iUserPassword, String[] iRoles)
OUser createUser(ODatabaseSession session, String iUserName, String iUserPassword, ORole[] iRoles)
OUser authenticate(ODatabaseSession session, OToken authToken)
ORole createRole(ODatabaseSession session, String iRoleName, ORole iParent, OSecurityRole.ALLOW_MODES iAllowMode)
ORole createRole(ODatabaseSession session, String iRoleName, OSecurityRole.ALLOW_MODES iAllowMode)
OUser getUser(ODatabaseSession session, String iUserName)
OUser getUser(ODatabaseSession session, ORID userId)
ORole getRole(ODatabaseSession session, String iRoleName)
ORole getRole(ODatabaseSession session, OIdentifiable iRoleRid)
List<ODocument> getAllUsers(ODatabaseSession session)
List<ODocument> getAllRoles(ODatabaseSession session)
Map<String,OSecurityPolicy> getSecurityPolicies(ODatabaseSession session, OSecurityRole role)
OSecurityPolicy getSecurityPolicy(ODatabaseSession session, OSecurityRole role, String resource)
session
- an active DB sessionrole
- the roleresource
- the string representation of the security resource, eg. "database.class.Person"void setSecurityPolicy(ODatabaseSession session, OSecurityRole role, String resource, OSecurityPolicy policy)
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 policyOSecurityPolicy createSecurityPolicy(ODatabaseSession session, String name)
session
- the session to a DB where the policy has to be createdname
- the policy nameOSecurityPolicy getSecurityPolicy(ODatabaseSession session, String name)
void saveSecurityPolicy(ODatabaseSession session, OSecurityPolicy policy)
void deleteSecurityPolicy(ODatabaseSession session, String name)
void removeSecurityPolicy(ODatabaseSession session, ORole role, String resource)
session
- A valid db session to perform the operationrole
- the roleresource
- the string representation of the security resource, eg. "database.class.Person"boolean dropUser(ODatabaseSession session, String iUserName)
boolean dropRole(ODatabaseSession session, String iRoleName)
void createClassTrigger(ODatabaseSession session)
long getVersion(ODatabaseSession session)
void incrementVersion(ODatabaseSession session)
OUser create(ODatabaseSession session)
void load(ODatabaseSession session)
void close()
Set<String> getFilteredProperties(ODatabaseSession session, ODocument document)
session
- the db sessiondocument
- the document to filterboolean isAllowedWrite(ODatabaseSession session, ODocument document, String propertyName)
session
- document
- current document to check for proeprty-level securitypropertyName
- the property to check for write accessboolean canCreate(ODatabaseSession session, ORecord record)
boolean canRead(ODatabaseSession session, ORecord record)
boolean canUpdate(ODatabaseSession session, ORecord record)
boolean canDelete(ODatabaseSession session, ORecord record)
boolean canExecute(ODatabaseSession session, OFunction function)
boolean isReadRestrictedBySecurityPolicy(ODatabaseSession session, String resource)
session
- The session to check for the existece of policiesresource
- a resource string, eg. "database.class.Person"Set<OSecurityResourceProperty> getAllFilteredProperties(ODatabaseDocumentInternal database)
database
- Copyright © 2009–2020 OrientDB. All rights reserved.