Built-in roles

This section describes the roles that come pre-defined with Neo4j.

Neo4j provides built-in roles with default privileges. The built-in roles and the default privileges are:

PUBLIC
  • Access to the default database.

  • Allows executing procedures with the users own privileges.

  • Allows executing user-defined functions with the users own privileges.

reader
  • Access to all databases.

  • Traverse and read on the data graph (all nodes, relationships, properties).

editor
  • Access to all databases.

  • Traverse, read, and write on the data graph.

  • Write access limited to creating and changing existing property keys, node labels, and relationship types of the graph. In other words, the editor role cannot add to the schema but can only make changes to already existing objects.

publisher
  • Access to all databases.

  • Traverse, read, and write on the data graph.

architect
  • Access to all databases.

  • Traverse, read, and write on the data graph.

  • Create/drop/show indexes and constraints along with any other future schema constructs.

admin
  • Access to all databases.

  • Traverse, read, and write on the data graph.

  • Create/drop/show indexes and constraints along with any other future schema constructs.

  • Allows executing procedures with the users own privileges or boosted privileges.

  • Allows executing admin procedures.

  • Allows executing user-defined functions with the users own privileges or boosted privileges.

  • View/terminate queries.

  • Manage databases, users, roles, and privileges.

All users will be assigned the PUBLIC role, which by default does not give any rights or capabilities regarding the data, not even read privileges. A user may have more than one assigned role, and the union of these determine what action(s) on the data may be undertaken by the user. For instance, a user assigned to the reader role will be able to execute procedures because all users are also assigned to the PUBLIC role, which enables that capability.

When an administrator suspends or deletes another user, the following rules apply:

  • Administrators can suspend or delete any other user (including other administrators), but not themselves.

  • The user will no longer be able to log back in (until re-activated by an administrator if suspended).

  • There is no need to remove assigned roles from a user prior to deleting the user.

Deleting a user will not automatically terminate associated connections, sessions, transactions, or queries.

The set of actions on the data and database prescribed by each role are described below. The subset of the functionality which is available with Community Edition is also included:

Table 1. Native roles overview
Action reader editor publisher architect admin PUBLIC Available in Community Edition

Change own password

X

X

X

X

X

X

X

View own details

X

X

X

X

X

X

X

Read data

X

X

X

X

X

X

Execute procedures

X

X

X

Execute functions

X

X

X

Execute admin procedures

X

X

View own queries

X

X

X

X

X

Terminate own queries

X

X

X

X

X

Write/update/delete existing data

X

X

X

X

X

Create new types of properties key

X

X

X

X

Create new types of nodes labels

X

X

X

X

Create new types of relationship types

X

X

X

X

Create/drop/show index/constraint

X

X

X

Create/delete user

X

X

Change another user’s password

X

X

Suspend/activate user

X

Create/drop roles

X

Assign/remove role to/from user

X

Create/drop databases

X

Start/stop databases

X

Manage database access

X

Access default database

X

X

X

X

X

X

X

Access all databases

X

X

X

X

X

X

View all users

X

X

View all roles

X

View all roles for a user

X

View all users for a role

X

View all queries

X

View all databases

X

View own privileges

X

X

X

X

X

X

View another user’s privileges

X

Grant/deny/revoke privileges

X

Terminate all queries

X

Dynamically change configuration (see Dynamic settings)

X

More information about the built-in roles and their privileges can be found in Neo4j Cypher Manual.