OrientDB Security - OrientDB

What is OrientDB Security?

Like RDBMS, OrientDB also presents security based on well-known principles, users, and roles. each database has its personal users and every person has one or extra roles. Roles are the aggregate of working modes and set of permissions.

Users

By using default OrientDB continues three special users for all database in the server −

  • Admin − This user has access to all functions on the database with out issue.
  • Reader − This consumer is a read-only user. The reader can question any data inside the database, however cannot adjust or delete them. It has no access to inner data, which include the users and roles themselves.
  • Writer − This user is similar to the user reader, however it can also create, update, and delete data.

Working with users

When you are related to a database, you may question the current users on the database through using select queries at the OUser class.

If the above question is executed successfully, you will get the following output.

Creating a New User

To create a new user, use the INSERT command. consider, in doing so, you need to set the status to active and provide it a valid position.

Updating Users

You can change the name for the user with the UPDATE statement.

In the same way, you can also change the password for the user.

OrientDB saves the password in a hash layout. The trigger OUserTrigger encrypts the password transparently before it saves the file.

Disabling users

To disable a user, use replace to replace its status from active to SUSPENDED. for example, if you need to disable all users except for admin, use the following command –

Roles

A role determines what operations a person can carry out towards a resource. particularly, this selection depends at the working mode and the rules. The rules themselves work differently, relying on the working mode.

Working with Roles

When you are related to a database, you may question the present day roles at the database using select queries on the ORole class.

If the above query is executed successfully, you will get the following output.

Creating New Roles

To create a new role, use the INSERT statement.

Working with Modes

In which rules decide what users belonging to positive roles can do on the databases, operating modes decide how OrientDB translates those rules. There are two types of working modes, particular by 1 and 0.

  • Allow All but (rules) − by default it is the terrific user mode. Specify exceptions to this the usage of the rules. If OrientDB finds no rules for a asked resource, then it lets in the user to execute the operation. Use this mode in particular for power customers and administrators. The default position admin uses this mode by means of default and has no exception rules. it is written as 1 within the database.
  • Deny All but (rules) − by using default this mode permits nothing. Specify exceptions to this using the rules. If OrientDB finds rules for a asked useful resource, then it lets in the user to execute the operation. Use this mode as the default for all classic users. The default roles, reader and writer, use this mode. it is written as 0 inside the database.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

OrientDB Topics