# RBAC Overview

Weaviate provides differentiated access through [authorization](deploy-configuration-authorization.md) levels based on the [authenticated](deploy-configuration-authentication.md) user identity.

If **role-based access control (RBAC)** is enabled, access can be further restricted based on the roles of users.
The diagram below illustrates the RBAC model in Weaviate, where access is governed by defining roles and assigning them specific permissions. These permissions determine which actions users can perform on designated resource types.

The main components are:

- **Users**:
  Individual users (e.g., `user-a` and `user-b`) are assigned to specific roles.

- **Roles**:
  Each role encapsulates a set of permissions. This abstraction lets you manage what actions a group of users can perform.

- **Permissions**:
  Permissions are comprised of three parts:
  - **Actions**: Operations like create, read, update, delete, and manage.
  - **Resources**: Specific targets for these actions, such as collections and backups.
  - **Optional constraints**: Resource-specific constraints such as filtering by collection names.

```mermaid
graph LR
  %% Users Subgraph
  subgraph Users
    UA["user-a"]
    UB["user-b"]
  end

  %% Roles Subgraph
  subgraph Roles
    RWR["readWriteRole"]
    BM["backupManager"]
  end

  %% Permissions Group (contains Actions and Resources) with extra newline for spacing
  subgraph Permissions["Permissions"]
    %% Actions Subgraph
    subgraph Actions
      C["create"]
      R["read"]
      U["update"]
      D["delete"]
      M["manage"]
    end

    %% Resources Subgraph
    subgraph Resources
      COL["collections"]
      BAC["backups"]
    end
  end

  %% Connections for user-a
  UA --> RWR
  RWR --> C
  RWR --> R
  RWR --> U
  RWR --> D

  %% Connections for user-b
  UB --> BM
  BM --> M

  %% Connections from actions to resources
  C --> COL
  R --> COL
  U --> COL
  D --> COL
  M --> BAC

%% Styling with soothing, Weaviate-compatible colors and slightly darker borders
style Users fill:#AEDFF7,stroke:#90C7E5,stroke-width:1px
style Roles fill:#C8E6C9,stroke:#A5D6A7,stroke-width:1px
style Actions fill:#ECEFF1,stroke:#B0BEC5,stroke-width:1px
style Resources fill:#CFD8DC,stroke:#AAB4BA,stroke-width:1px
style Permissions fill:#E0F7FA,stroke:#B2EBF2,stroke-width:1px
```

This RBAC system ensures that users only have the access necessary for their roles, enhancing both security and manageability within Weaviate. Roles and permissions can be managed through the Weaviate **[REST API](/weaviate/api/rest#tag/authz)** directly or through a **[client library](weaviate-configuration-rbac-manage-roles.md)** programmatically.

## Roles

### Predefined roles

Weaviate comes with a set of predefined roles. These roles are:

- `root`: The root role has **full access** to all resources in Weaviate.
- `viewer`: The viewer role has **read-only access** to all resources in Weaviate.

The `root` role can be assigned to a user through the Weaviate configuration file using the [`AUTHORIZATION_RBAC_ROOT_USERS`](../database-configuration/overview.md#rbac-authorization) environment variable. A predefined role cannot be modified. The user can, however, be assigned additional roles through the Weaviate API.

All roles can also be assigned through the Weaviate API, including the predefined role. The predefined roles cannot be modified, but they can be assigned to or revoked from users.

Refer to the [RBAC: Configuration](deploy-configuration-configuring-rbac.md) page for more information on how to assign predefined roles to users.

### Custom roles

Any authenticated user that is not assigned a predefined role has no roles or permissions by default.

These users' permissions can be modified through Weaviate by those with the appropriate permissions for **managing roles**. This allows for the creation of custom roles, which can be assigned to users as needed.

Role management can be performed with a [predefined `root` role](deploy-configuration-configuring-rbac.md) or a custom role with [`manage_roles` permissions](weaviate-configuration-rbac-manage-roles.md#create-a-role-with-role-management-permissions).

:::callout{intent="warning" title="Role Management Permissions"}
Be careful when assigning permissions to roles that manage roles. These permissions can be used to escalate privileges by assigning additional roles to users. Only assign these permissions to trusted users.
:::

## Permissions

Permissions in Weaviate define what actions users can perform on specific resources. Each permission consists of:

- A resource type (e.g., collections, objects)
- Access levels (read, write, update, delete, manage)
- Optional resource-specific constraints

### Available permissions

Permissions can be defined with the following resources, access levels and optional constraints:

<!-- TODO: Potentially replace with a React component -->

| Resource type                                                                                                                                                                    | Access levels                                                                                                             | Optional resource‑specific constraints                                                                                                                                                                                                                              |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**Role Management**](weaviate-configuration-rbac-manage-roles.md#create-a-role-with-role-management-permissions)                                                                | Create roles<br>Read role info<br>Update role permissions<br>Delete roles                                                 | Role name filter:<br>- `string or regex`: specifies which roles can be managed<br>Role scope:<br>- `all`: Allow role management with all permissions<br>- `match`: Only allow role management with the current user's permission level                              |
| [**User Management**](weaviate-configuration-rbac-manage-roles.md#create-a-role-with-user-management-permissions)                                                                | Create users<br>Read user info<br>Update/rotate user API key<br>Delete users<br>Assign and revoke roles to and from users | User name filter:<br>- `string or regex`: specifies which users can be managed                                                                                                                                                                                      |
| [**Collections**](weaviate-configuration-rbac-manage-roles.md#create-a-role-with-collections-permissions)<br>(collection definitions only, data object permissions are separate) | Create collections<br>Read collection definitions<br>Update collection definitions<br>Delete collections                  | Collection name filter:<br>- `string or regex`: specifies which collections can be managed                                                                                                                                                                          |
| [**Tenants**](weaviate-configuration-rbac-manage-roles.md#create-a-role-with-tenant-permissions)                                                                                 | Create tenants<br>Read tenant info<br>Update tenants<br>Delete tenants                                                    | Collection name filter:<br>- `string or regex`: specifies which collections' tenants can be managed<br>Tenant name filter:<br>- `string or regex`: specifies which tenants can be managed                                                                           |
| [**Data Objects**](weaviate-configuration-rbac-manage-roles.md#create-a-role-with-data-objects-permissions)                                                                      | Create objects<br>Read objects<br>Update objects<br>Delete objects                                                        | Collection name filter:<br>- `string or regex`: specifies which collections' objects can be managed<br>Tenant name filter:<br>- `string or regex`: specifies which tenants' objects can be managed                                                                  |
| [**Backups**](weaviate-configuration-rbac-manage-roles.md#create-a-role-with-backups-permissions)                                                                                | Manage backups                                                                                                            | Collection name filter:<br>- `string or regex`: specifies which collections' backups can be managed                                                                                                                                                                 |
| [**Cluster Data Access**](weaviate-configuration-rbac-manage-roles.md#create-a-role-with-cluster-data-access-permissions)                                                        | Read cluster metadata                                                                                                     |                                                                                                                                                                                                                                                                     |
| [**Node Data Access**](weaviate-configuration-rbac-manage-roles.md#create-a-role-with-node-data-access-permissions)                                                              | Read node metadata at a specified verbosity level                                                                         | Verbosity level:<br>- `minimal`: Minimal read permission for all collections.<br>- `verbose`: Verbose read permission for specified collections.<br>Collection name filter (only for `verbose`):<br>- `string or regex`: specifies which collections can be managed |
| [**Collection aliases**](weaviate-configuration-rbac-manage-roles.md#create-a-role-with-collection-alias-permissions)                                                            | Create aliases<br>Read aliases<br>Update aliases<br>Delete aliases                                                        | Alias name filter:<br>- `string or regex`: specifies which aliases can be managed                                                                                                                                                                                   |
| [**Replications**](weaviate-configuration-rbac-manage-roles.md#create-a-role-with-replications-permissions)                                                                      | Create replications<br>Read replications<br>Update replications<br>Delete replications                                    | Collection name filter:<br>- `string or regex`: specifies which collections' objects can be managed<br>Shard name filter:<br>- `string or regex`: specifies which shards can be managed                                                                             |
| [**Groups**](weaviate-configuration-rbac-manage-roles.md#create-a-role-with-groups-permissions)                                                                                  | Read groups<br>Assign and revoke group membership                                                                         | Group name filter:<br>- `string or regex`: specifies which groups can be managed<br>Group type filter:<br>- `oidc` (only OIDC user groups are supported at the moment)                                                                                              |

### Permission behavior

When defining permissions, setting a permission to `False` indicates that the permission is _not set_, rather than explicitly denying access. This means that if a user has multiple roles, and one role grants a permission while another sets it to `False`, the user will still have that permission through the role that grants it.

For example, if a user has two roles:

- Role A sets `read` to `False` for Collection X
- Role B sets `read` to `True` for Collection X

The user will have read access to Collection X because Role B grants the permission, while Role A's `False` value simply indicates no permission is set rather than blocking access.

### Name filters in permissions

Some permissions require a collection name filter to specify which collections the permission applies to.

In this case, `"*"` acts as a multi-character wildcard. As an example, setting a permission with `"Test*"` as the collection name filter would apply that permission to all collections that start with `Test`. Or, setting a permission with `"*"` as the collection filter would apply that permission to all available collections.

### Collection and tenant permissions

A collection permission is independent of tenant permissions.

To have permissions to operate on a tenant that belongs to a collection, the user must have the appropriate tenant-level permissions for that collection. Collection-level permissions, such as that to create collections, do not grant the equivalent tenant-level permissions, such as that to create tenants for that collection.

For example, to create a tenant in a collection called `TestCollection`, the user must have permission to "create" tenants in that collection. This is separate from the permission to create a collection called `TestCollection`.

## Users

The [user management](weaviate-configuration-rbac-manage-users.md) API can be used to create, delete and list users, rotate their API keys and manage their roles.

## Further resources

- [RBAC: Configuration](deploy-configuration-configuring-rbac.md)
- [RBAC: Manage roles](weaviate-configuration-rbac-manage-roles.md)
- [RBAC: Manage users](weaviate-configuration-rbac-manage-users.md)
- [RBAC: Tutorial](../guides-tutorials/rbac.md)

## Questions and feedback

Have a question or feedback? Here's how to reach us.

::::card-grid
:::card{title="Community Forum" href="https://forum.weaviate.io/c/support" icon="messages-square"}
Ask questions and connect with other developers on our **Community forum**.
:::

:::card{title="Support" href="/guides/support-overview" icon="life-buoy"}
Weaviate Cloud user or customer? Find the right channel on the **Support page**.
:::
::::

## Related pages

- [Agents](./agents-index.md)
- [AI-assisted Weaviate code generation](./ai-assisted-vibe-coding-index.md)
- [APIs](./apis-index.md)
- [Authorization and authentication](./authorization-and-authentication-index.md)
- [Benchmarks](./benchmarks-index.md)
- [Best practices](./best-practices-index.md)
- [Client libraries](./clients-index.md)
- [Client Libraries / SDKs](./client-libraries-index.md)
- [Cloud](./cloud-index.md)
- [Cloud account management](./cloud-account-management-index.md)

# Agent Instructions

This portal answers questions programmatically. To receive a synthesized,
source-cited answer instead of crawling page by page, append the `?ask=`
query parameter to any page URL on this site:

    /guides/quickstart?ask=how+do+I+authenticate

Optional parameters:

- `&goal=<what-you-are-trying-to-do>` steers the answer toward your
  objective (e.g. `&goal=write+a+python+client`).
- `&version=<label>` scopes the answer to a mounted version when the
  portal publishes more than one.

The response is `text/markdown`: the answer followed by a `# Sources` list
of the portal pages it was grounded in. Status codes are the contract:

- `200` — the answer; `402` — the portal owner’s plan or answer credits are
  exhausted (surface this to your operator; do NOT retry); `429` — you are
  rate-limited; back off for the `Retry-After` seconds; `503` — the answer
  lane is temporarily unavailable; fall back to crawling the `.md` pages.

For the full corpus map read `llms.txt` at the site root; for the tool
surface (search + page fetch as MCP tools) see `/mcp`.
