User roles and permissions

GraphDB’s Access control uses a combination of hierarchical Role Based Access Control (RBAC) and per-repository permissions, where every user is assigned a user role, with the option to provide additional permissions to users with the ROLE_USER role (which has been detailed further down below in this page). The model defines three entities:

  1. Users are members of roles and acquire the permissions associated with the roles.

  2. Roles are groups of access permissions assigned to users. Roles are organized in hierarchies, with each child role inheriting the permissions associated with any parent roles.

  3. Permissions grant access privileges to execute a specific operation. All roles come with a set of associated access permissions, but some users can also receive additional permissions on a repository level.

RBAC in GraphDB does not define sessions, as the security implementation is stateless. An authorized user always receives the full set of roles associated with it. Within a single API request call there is always an associated user and hence roles and permissions.

See also

User roles

The core roles defined in GraphDB security model follow a hierarchy:

Role name

Inherits roles

Associated permissions (without the inherited ones)

ROLE_ADMIN

ROLE_REPO_MANAGER
ROLE_CLUSTER

Can perform all operations, or in other words — the security never rejects an operation

ROLE_REPO_MANAGER

ROLE_MONITORING

Can create, edit, and delete repositories with read and write permissions to all repositories

ROLE_MONITORING

ROLE_USER

Allows monitoring operations (queries, updates, abort query/update, resource monitoring)

ROLE_USER

Can save SPARQL queries, graph visualizations, or user-specific settings

ROLE_CLUSTER

Can perform internal cluster operations

The GraphDB user management interface uses a simplified high level model, where each created user falls into one of three categories — a regular user, a repository manager, or an administrator. The three categories correspond directly to one of the core roles:

Inherent role and permissions

Regular user

Repository manager

Administrator

Core role

ROLE_USER

ROLE_REPO_MANAGER

ROLE_ADMIN

Bypass FGAC checks

no

yes

yes

Read access to a specific repository

optional

no

no

Read/write access to a specific repository

optional

no

no

Read/write access to all repositories

no

yes

yes

Create, edit, and delete repositories

no

yes

yes

Access monitoring

no

yes

yes

Manage Connectors

no

yes

yes

Manage Users and Access

no

no

yes

Manage the cluster

no

no

yes

Attach remote locations

no

no

yes

View system information

no

no

yes

Additional permissions

In addition to the permissions associated with any given role, users can also be given additional permissions on a per-repository basis. These additional permissions can be set invididually for each user and widen the scope of operations a user can perform.

Additional permissions are used to grant specific access rights to specific repositories. Only users with the ROLE_USER role can be given such permissions, as ROLE_REPO_MANAGER and ROLE_ADMIN already include all possible operations related to the handling of repositories.

Although they serve different functions and are classified in different ways, roles and permissions are managed the same way (in other words, managed through the same endpoints) when using the REST API.

See also

  • Fine-grained access control can be used for controlling access below the repository level, for example, restricting individual RDF statements or named graphs.

  • You can also limit the scope of the additional permissions to apply only for GraphQL, without enabling access to the RDF layer. See the GraphQL security for more information.

The following additional permissions on a repository level are available as well to users with the ROLE_USER role:

Role name

Associated permissions

READ_REPO_*

Read permissions to all repositories.

WRITE_REPO_*

Write permissions to all repositories. Requires the READ_REPO_* permission to be provided as well.

READ_REPO_xxx

Read permissions to a given repository, where xxx is the repository ID.

WRITE_REPO_xxx

Write permissions to a given repository, where xxx is the repository ID. Requires the READ_REPO_xxx permission for the same repository to be provided as well.

MAINTAIN_REPO_xxx

Allows the user to restart a given repository and edit its permissions, where xxx is the repository ID. This permission does not grant the right to delete the repository.

When providing the MAINTAIN_REPO_xxx permission for a given repository, the READ_REPO_xxx and WRITE_REPO_xxx permissions for the same repository must be provided as well.

Custom roles

GraphDB has a facility for defining custom roles that can be used together with Fine-grained access control for controlling access to individual RDF statements or named graphs.

Built-in users and roles

GraphDB has two special internal users that are required for the functioning of the database. These users cannot be seen or modified via user management.

Username

Associated roles and permissions

Description

<cluster user>

ROLE_CLUSTER
READ_REPO_*
WRITE_REPO_*

Used for cluster-internal communication between cluster nodes.

<free access user>

None by default but administrators may grant access to one or more repositories.

The user associated with anonymous access if anonymous access is enabled. Check the security documentation to see how to configure Free access.