Chapter 5. Managing access to projects


5.1. Custom roles for workbenches

You can use custom roles to control fine-grained, resource-level permissions for workbenches within a project. With custom roles, project administrators can define exactly who can view, edit, start, stop, or delete specific workbench instances, going beyond the default Admin and Contributor permission levels.

5.1.1. Kubernetes RBAC foundations

OpenShift AI custom roles build on the role-based access control (RBAC) model that is native to Kubernetes and OpenShift. In Kubernetes RBAC, access decisions are governed by three core objects:

Role
A Role defines a set of permissions as rules. Each rule specifies an API group, a resource type, and the verbs that are allowed on that resource. A Role is scoped to a single namespace, which maps to a single OpenShift AI project. A ClusterRole uses the same rules structure but is not namespace-scoped, allowing it to be reused across multiple projects.
RoleBinding
A RoleBinding grants the permissions defined in a Role or ClusterRole to a user, a group, or a service account within a namespace. A single role can be bound to multiple subjects, and a single subject can have multiple RoleBindings.
Subject
A subject is the user, group, or service account to which a RoleBinding grants permissions.

By using these standard Kubernetes objects, OpenShift AI custom roles inherit the security, auditability, and extensibility of the platform’s existing access control framework. All permission changes are recorded by the Kubernetes API audit log, and roles integrate with your existing identity provider and group management without requiring a separate access control system.

5.1.2. Why fine-grained RBAC matters

The default Admin and Contributor permission levels in OpenShift AI projects provide broad access to all project resources. In environments where multiple users or teams share a project, these broad permission levels can be insufficient:

Least-privilege access
Organizations with security or compliance requirements must ensure that users have only the minimum permissions required for their tasks. A data scientist who runs preconfigured workbenches should not have permission to delete or reconfigure them.
Resource isolation
In shared projects, administrators might need to prevent users from viewing or interacting with workbenches that are not assigned to them, protecting sensitive configurations and data connections.
Operational safety
Restricting destructive actions, such as deleting workbenches, to a small set of administrators reduces the risk of accidental data loss in production environments.
Auditability
Fine-grained roles produce more meaningful audit trails. When each user’s permissions are tightly scoped, audit logs clearly show which user had authorization to perform a specific action.

In OpenShift AI, each workbench is represented by a Notebook custom resource in the kubeflow.org API group. When you create, start, stop, or delete a workbench in the OpenShift AI dashboard, the dashboard performs the corresponding Kubernetes API operation on the Notebook resource in the project namespace. Custom roles for workbenches define permissions against this Notebook resource, which means that Kubernetes RBAC rules control access to workbench operations at the API level.

5.1.4. How custom roles work

Custom roles for workbenches are Kubernetes Role or ClusterRole objects that define permissions for Notebook resources. A Role applies to a single project namespace, while a ClusterRole can be reused across multiple projects. You create custom roles by using the oc CLI or by importing a YAML definition in the OpenShift web console. You then assign the roles to users or groups from the OpenShift AI dashboard.

To make a custom role visible in the OpenShift AI dashboard, you must apply the following label to the Role or ClusterRole object:

metadata:
  labels:
    opendatahub.io/dashboard: 'true'

Roles with this label appear in the dashboard’s role selection list with an AI role label in the Role type column, distinguishing them from default OpenShift roles such as Admin or Edit.

5.1.5. Example use cases

The following examples illustrate how custom roles address common access control requirements:

Workbench reader
A user can view workbench configurations and status but cannot modify, start, or stop workbenches.
Workbench operator
A user can start and stop existing workbenches but cannot create new workbenches or edit their configurations.
Workbench editor
A user can create and modify workbenches but cannot delete them.

5.1.6. Scope and limitations

  • Custom roles apply to workbench resources only. Granular RBAC for other project resources such as pipelines, model servers, and data connections is planned for a future release.
  • You can only create and edit custom roles by using the oc CLI or by importing YAML in the OpenShift web console. Creating or editing custom roles directly in the OpenShift AI dashboard is not supported. A dashboard interface for administrators to create and configure custom roles is planned for a future release.
  • A custom role must have the opendatahub.io/dashboard: 'true' label to display in the OpenShift AI dashboard. Roles without this label are not displayed.
  • You can assign multiple custom roles to a single user or group. The effective permissions are the union of all assigned roles.

5.2. Create a custom workbench role

You can create a custom Kubernetes role that defines fine-grained permissions for workbench resources in a project by using the oc CLI or by importing a YAML definition in the OpenShift web console. After you apply the required label, the role becomes available for assignment in the OpenShift AI dashboard.

Note

Creating or editing custom roles directly in the OpenShift AI dashboard is not supported. You must use the oc CLI or the OpenShift web console to create custom roles.

Prerequisites

  • You have cluster-admin or project administrator privileges on the OpenShift cluster.
  • You have access to the oc CLI or the OpenShift web console.

Procedure

  1. Define a Role or ClusterRole object that specifies the permissions you want to grant for workbench resources. Use a Role to scope permissions to a single project namespace, or use a ClusterRole to define a reusable role that can be assigned across multiple projects. Save the following YAML to a file, or prepare it for import in the OpenShift web console.

    The following example creates a namespace-scoped role that allows a user to view workbenches but not modify them:

    apiVersion: rbac.authorization.k8s.io/v1
    kind: Role
    metadata:
      name: <role_name>
      namespace: <project_namespace>
      labels:
        opendatahub.io/dashboard: true
    rules:
      - apiGroups:
          - kubeflow.org
        resources:
          - notebooks
        verbs:
          - get
          - list
          - watch

    To create a ClusterRole instead, set kind: ClusterRole and omit the namespace field:

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRole
    metadata:
      name: <role_name>
      labels:
        opendatahub.io/dashboard: true
    rules:
      - apiGroups:
          - kubeflow.org
        resources:
          - notebooks
        verbs:
          - get
          - list
          - watch

    where:

    _<role_name>_
    Specifies a descriptive name for the role, such as workbench-reader or workbench-operator.
    _<project_namespace>_
    Specifies the namespace of the OpenShift AI project where the role applies. This field is required for a Role and must be omitted for a ClusterRole.
  2. Create the role by using one of the following methods:

    • CLI: Apply the YAML file by running the following command:

      $ oc apply -f <role_file>.yaml
    • OpenShift web console: In the web console, click the Import YAML icon (+) in the top navigation bar. Paste your YAML definition into the editor and click Create.
  3. Verify that the role was created and that the required label is present:

    $ oc get roles -n <project_namespace> <role_name> -o yaml

    Confirm that the opendatahub.io/dashboard: 'true' label is output in the metadata.labels section. This label is required for the role to display in the OpenShift AI dashboard.

Verification

  1. Log in to the OpenShift AI dashboard.
  2. Navigate to the Permissions tab of the project where you created the role.
  3. Click Manage Permissions and verify that your custom role appears in the role selection list with an AI role label in the Role type column.

5.3. Grant access to a project

To enable your organization to work collaboratively, you can grant access to your project to other users and groups.

Prerequisites

  • You have logged in to Red Hat OpenShift AI.
  • You have created a project.

Procedure

  1. From the OpenShift AI dashboard, click Projects.

    The Projects page opens.

  2. From the list of projects, click the name of the project that you want to grant access to.

    A project details page opens.

  3. Click the Permissions tab.

    The Permissions page for the project opens.

  4. Click Manage Permissions.
  5. From the Subject Kind list, select User or Group.
  6. In the search field, enter the name of the user or group to whom you want to grant access. If the subject is not present in the list, enter the name directly.
  7. From the role selection list, select one of the following access permission levels:

    • Admin: Subjects with this access level can edit project details and manage access to the project.
    • Contributor: Subjects with this access level can view and edit project components, such as its workbenches, connections, and storage.
  8. Review the assignment summary in the confirmation dialog.
  9. Click Confirm to apply the access permissions.
  10. Optional: To grant access to additional users or groups, repeat this process.

Verification

  • Users to whom you provided access to the project can perform only the actions permitted by their access permission level.
  • The Permissions tab shows the users and groups that you granted access to and their assigned roles.

5.4. Assign custom roles to project users

As a project administrator, you can assign custom roles to users and groups from the Permissions tab in the OpenShift AI dashboard. Custom roles provide fine-grained, resource-level permissions for workbenches within a project.

Prerequisites

  • You have logged in to Red Hat OpenShift AI.
  • You have OpenShift AI administrator privileges or you are the project owner.
  • You have created a project.
  • One or more custom roles with the opendatahub.io/dashboard: 'true' label exist in the project namespace. For more information, see Section 5.2, “Create a custom workbench role”.

Procedure

  1. From the OpenShift AI dashboard, click Projects.

    The Projects page opens.

  2. Click the name of the project in which you want to assign custom roles.

    A project details page opens.

  3. Click the Permissions tab.

    The Permissions page for the project opens.

  4. Click Manage Permissions.
  5. From the Subject Kind list, select User or Group.
  6. In the search field, enter the name of the user or group to whom you want to assign a role. If the subject is not present in the list, enter the name directly.
  7. From the role selection list, select the custom role to assign. The dashboard displays roles that have the opendatahub.io/dashboard: 'true' label with an AI role label in the Role type column, distinguishing them from default OpenShift roles.

    Note

    You can select multiple roles simultaneously for a single subject. The effective permissions are the union of all assigned roles.

  8. Review the role assignment summary in the confirmation dialog.
  9. Click Confirm to apply the role assignments.

Verification

  • The Permissions tab shows the custom roles assigned to each user and group.
  • Users with assigned custom roles can perform only the actions permitted by their roles.

5.5. Update access to a project

To change the level of collaboration on your project, you can update the access permissions of users and groups who have access to your project. You can manage permissions from the action menu on individual role assignments or by using the Manage Permissions flow.

Prerequisites

  • You have logged in to Red Hat OpenShift AI.
  • You have OpenShift AI administrator privileges or you are the project owner.
  • You have created a project.
  • You have previously assigned roles to users or groups in your project.

Procedure

  1. From the OpenShift AI dashboard, click Projects.

    The Projects page opens.

  2. Click the name of the project that you want to change the access permissions of.

    A project details page opens.

  3. Click the Permissions tab.

    The Permissions page for the project opens. Each row shows an individual role assignment for a user or group.

  4. Locate the role assignment that you want to update and click the action menu ().
  5. Click Manage permissions.

    The Manage Permissions dialog opens.

  6. From the role selection list, select the updated access permission level or custom role for the subject.
  7. Review the updated assignment summary in the confirmation dialog.
  8. Click Confirm to apply the updated access permissions.

Verification

  • The Permissions tab shows the updated roles assigned to the users and groups whose access permissions you changed.

5.6. Remove access to a project

You can restrict access to your project by unassigning roles from users and groups. Each role assignment is listed as a separate row on the Permissions tab, and you can unassign roles individually.

Prerequisites

  • You have logged in to Red Hat OpenShift AI.
  • You have OpenShift AI administrator privileges or you are the project owner.
  • You have created a project.
  • You have previously assigned roles to users or groups in your project.

Procedure

  1. From the OpenShift AI dashboard, click Projects.

    The Projects page opens.

  2. Click the name of the project that you want to change the access permissions of.

    A project details page opens.

  3. Click the Permissions tab.

    The Permissions page for the project opens. Each row shows an individual role assignment for a user or group.

  4. Locate the role assignment that you want to remove and click the action menu ().
  5. Click Unassign.

    The Unassign role? dialog opens and warns that the user or group will lose the permissions that this role grants.

    Note

    If the role was assigned through OpenShift rather than through the OpenShift AI dashboard, the dialog warns that you cannot reassign the role from OpenShift AI. To reassign this role, you must use the OpenShift web console or CLI.

  6. Click Unassign role to confirm.

Verification

  • The role assignment no longer appears on the Permissions tab.
  • The affected user or group can no longer perform the actions that the removed role permitted.

5.7. Custom workbench roles reference

Custom workbench roles are Kubernetes Role or ClusterRole objects that define fine-grained permissions for workbench resources. A Role is scoped to a single project namespace, while a ClusterRole can be reused across multiple projects. This reference describes the label requirements, available resources, and verbs that you can use to build custom roles.

5.7.1. Label requirement

For a custom role to display in the OpenShift AI dashboard, you must apply the following label to the Role or ClusterRole object:

metadata:
  labels:
    opendatahub.io/dashboard: 'true'

Roles with this label are displayed with an AI role label in the Role type column in the dashboard, distinguishing them from default OpenShift roles.

5.7.2. Workbench resources and verbs

Each workbench in OpenShift AI is a Notebook custom resource in the kubeflow.org API group. The following table describes the Kubernetes resource and verbs that you can use in the rules section of your Role or ClusterRole definition to control workbench operations.

Expand
Table 5.1. Workbench resource verbs
API groupResourceAvailable verbs

kubeflow.org

notebooks

create, get, list, watch, update, patch, delete

5.7.3. Example role definitions

The following examples show common custom role configurations for workbenches.

Workbench reader

Allows a user to view workbench configurations and status without making changes.

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: workbench-reader
  labels:
    opendatahub.io/dashboard: 'true'
rules:
  - apiGroups:
      - kubeflow.org
    resources:
      - notebooks
    verbs:
      - get
      - list
      - watch

Workbench operator

Allows a user to start and stop existing workbenches without creating or deleting them.

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: workbench-operator
  labels:
    opendatahub.io/dashboard: 'true'
rules:
  - apiGroups:
      - kubeflow.org
    resources:
      - notebooks
    verbs:
      - get
      - list
      - watch
      - patch

Workbench editor

Allows a user to create and modify workbenches without deleting them.

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: workbench-editor
  labels:
    opendatahub.io/dashboard: 'true'
rules:
  - apiGroups:
      - kubeflow.org
    resources:
      - notebooks
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
Note

The example roles above do not include the delete verb. To grant delete permissions for workbenches, add delete to the verbs list in your custom role’s rules.

5.7.4. Default project roles

The following default roles remain available in the OpenShift AI dashboard alongside custom roles:

Expand
Table 5.2. Default project roles
RolePermissions

Admin

Can edit project details and manage access to the project.

Contributor

Can view and edit project components, such as workbenches, connections, and storage.

Custom roles supplement these default roles. When a user has both a default role and one or more custom roles, the effective permissions are the union of all assigned roles.

Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top