User roles and permissions¶
What’s in this document?
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:
Users are members of roles and acquire the permissions associated with the roles.
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.
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
The Access control page details the three types of user authentication and authorization databases GraphDB supports — Local user database, LDAP user database, and Authorization and user database — describes how to configure them, and provides example configurations.
The User management page details how to assign these roles through the GraphDB Workbench, and covers additional topics such as creating, editing and deleting users.
User roles¶
The core roles defined in GraphDB security model follow a hierarchy:
Role name |
Inherits roles |
Associated permissions (without the inherited ones) |
|---|---|---|
|
ROLE_REPO_MANAGERROLE_CLUSTER |
Can perform all operations, or in other words — the security never rejects an operation |
|
|
Can create, edit, and delete repositories with read and write permissions to all repositories |
|
|
Allows monitoring operations (queries, updates, abort query/update, resource monitoring) |
|
Can save SPARQL queries, graph visualizations, or user-specific settings |
|
|
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 |
|
|
|
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 permissions to all repositories. |
|
Write permissions to all repositories. Requires the |
|
Read permissions to a given repository, where |
|
Write permissions to a given repository, where |
|
Allows the user to restart a given repository and edit its permissions,
where When providing the |
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 |
|---|---|---|
|
ROLE_CLUSTERREAD_REPO_*WRITE_REPO_* |
Used for cluster-internal communication between cluster nodes. |
|
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.
|