Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 1. Managing users and groups
Users with cluster administrator access to OpenShift can add, modify, and remove user permissions for Red Hat OpenShift AI.
1.1. Overview of user types and permissions
Table 1 describes the Red Hat OpenShift AI user types.
User Type | Permissions |
---|---|
Users | Machine learning operations (MLOps) engineers and data scientists can access and use individual components of Red Hat OpenShift AI, such as workbenches and data science pipelines. See also Accessing the OpenShift AI dashboard. |
Administrators | In addition to the actions permitted to users, administrators can perform these actions:
|
By default, all OpenShift users have access to Red Hat OpenShift AI. In addition, users in the OpenShift administrator group (cluster admins
), automatically have administrator access in OpenShift AI.
Optionally, if you want to restrict access to your OpenShift AI deployment to specific users or groups, you can create user groups for users and administrators.
If you decide to restrict access, and you already have user groups defined in your configured identity provider, you can add these user groups to your OpenShift AI deployment. If you decide to use user groups without adding these groups from an identity provider, you must create the groups in OpenShift and then add users to them.
There are some operations relevant to OpenShift AI that require the cluster-admins
role. Those operations include:
- Adding users to the OpenShift AI user and administrator groups.
- Removing users from the OpenShift AI user and administrator groups.
- Managing custom environment and storage configuration for users in OpenShift, such as Jupyter notebook resources, ConfigMaps, and persistent volume claims (PVCs).
- Managing data science pipeline servers and pipeline applications from the OpenShift AI dashboard, or from the command-line interface (CLI), for any data science project.
Although users of OpenShift AI and its components are authenticated through OpenShift, session management is separate from authentication. This means that logging out of OpenShift or OpenShift AI does not affect a logged in Jupyter session running on those platforms. This means that when a user’s permissions change, that user must log out of all current sessions in order for the changes to take effect.
Additional resources
See also OpenShift Dedicated cluster administration or Red Hat OpenShift Service on AWS (ROSA) cluster administration.
1.2. Viewing OpenShift AI users
If you have defined OpenShift AI user groups, you can view the users that belong to these groups.
Prerequisites
- The Red Hat OpenShift AI user group, administrator group, or both exist.
-
You have the
cluster-admin
role or you are part of thededicated-admins
administrator group. Thededicated-admins
group applies only to OpenShift Dedicated. - You have configured a supported identity provider for your OpenShift cluster.
Procedure
-
In the OpenShift web console, click User Management
Groups. Click the name of the group containing the users that you want to view.
-
For administrative users, click the name of your administrator group. for example,
rhoai-admins
. For normal users, click the name of your user group, for example,
rhoai-users
.The Group details page for the group appears.
-
For administrative users, click the name of your administrator group. for example,
Verification
- In the Users section for the relevant group, you can view the users who have permission to access Red Hat OpenShift AI.
1.3. Adding users to OpenShift AI user groups
By default, all OpenShift users have access to Red Hat OpenShift AI.
Optionally, you can restrict user access to your OpenShift AI instance by defining user groups. You must grant users permission to access Red Hat OpenShift AI by adding user accounts to the Red Hat OpenShift AI user group, administrator group, or both. You can either use the default group name, or specify a group name that already exists in your identity provider.
The user group provides the user with access to product components in the Red Hat OpenShift AI dashboard, such as data science pipelines, and associated services, such as Jupyter. By default, users in the user group have access to data science pipeline applications within data science projects that they created.
The administrator group provides the user with access to developer and administrator functions in the Red Hat OpenShift AI dashboard, such as data science pipelines, and associated services, such as Jupyter. Users in the administrator group can configure data science pipeline applications in the OpenShift AI dashboard for any data science project.
If you restrict access by using user groups, users that are not in the OpenShift AI user group or administrator group cannot view the dashboard and use associated services, such as Jupyter. They are also unable to access the Cluster settings page.
If you are using LDAP as your identity provider, you need to configure LDAP syncing to OpenShift. For more information, see Syncing LDAP groups in OpenShift Dedicated or Syncing LDAP groups in Red Hat OpenShift Service on AWS (ROSA).
Follow the steps in this section to add users to your OpenShift AI administrator and user groups.
Note: You can add users in OpenShift AI but you must manage the user lists in the OpenShift web console.
Prerequisites
- You have configured a supported identity provider for your OpenShift cluster.
-
You are part of the
cluster-admins
ordedicated-admins
user group in your OpenShift cluster. Thededicated-admins
user group applies only to OpenShift Dedicated. - You have defined an administrator group and user group for OpenShift AI.
Procedure
-
In the OpenShift web console, click User Management
Groups. Click the name of the group you want to add users to.
-
For administrative users, click the administrator group, for example,
rhoai-admins
. For normal users, click the user group, for example,
rhoai-users
.The Group details page for that group appears.
-
For administrative users, click the administrator group, for example,
Click Actions
Add Users. The Add Users dialog appears.
- In the Users field, enter the relevant user name to add to the group.
- Click Save.
Verification
- Click the Details tab for each group and confirm that the Users section contains the user names that you added.
1.4. Selecting OpenShift AI administrator and user groups
By default, all users authenticated in OpenShift can access OpenShift AI.
Also by default, users with cluster-admin
permissions are OpenShift AI administrators. A cluster admin
is a superuser that can perform any action in any project in the OpenShift cluster. When bound to a user with a local binding, they have full control over quota and every action on every resource in the project.
After a cluster admin
user defines additional administrator and user groups in OpenShift, you can add those groups to OpenShift AI by selecting them in the OpenShift AI dashboard.
Prerequisites
- You have logged in to OpenShift AI as a user with OpenShift AI administrator privileges.
- The groups that you want to select as administrator and user groups for OpenShift AI already exist in OpenShift. For more information, see Managing users and groups.
Procedure
-
From the OpenShift AI dashboard, click Settings
User management. - Select your OpenShift AI administrator groups: Under Data science administrator groups, click the text box and select an OpenShift group. Repeat this process to define multiple administrator groups.
Select your OpenShift AI user groups: Under Data science user groups, click the text box and select an OpenShift group. Repeat this process to define multiple user groups.
ImportantThe
system:authenticated
setting allows all users authenticated in OpenShift to access OpenShift AI.- Click Save changes.
Verification
- Administrator users can successfully log in to OpenShift AI and have access to the Settings navigation menu.
- Non-administrator users can successfully log in to OpenShift AI. They can also access and use individual components, such as projects and workbenches.
1.5. Deleting users
1.5.1. About deleting users and their resources
If you have administrator access to OpenShift, you can revoke a user’s access to Jupyter and delete the user’s resources from Red Hat OpenShift AI.
Deleting a user and the user’s resources involves the following tasks:
- Before you delete a user from OpenShift AI, it is good practice to back up the data on your persistent volume claims (PVCs).
- Stop notebook servers owned by the user.
- Revoke user access to Jupyter.
- Remove the user from the allowed group in your OpenShift identity provider.
- After you delete a user, delete their associated configuration files from OpenShift.
1.5.2. Stopping notebook servers owned by other users
OpenShift AI administrators can stop notebook servers that are owned by other users to reduce resource consumption on the cluster, or as part of removing a user and their resources from the cluster.
Prerequisites
- You have logged in to OpenShift AI as a user with OpenShift AI administrator privileges.
- You have launched the Jupyter application, as described in Starting a Jupyter notebook server.
- The notebook server that you want to stop is running.
Procedure
- On the page that opens when you launch Jupyter, click the Administration tab.
Stop one or more servers.
If you want to stop one or more specific servers, perform the following actions:
- In the Users section, locate the user that the notebook server belongs to.
To stop the notebook server, perform one of the following actions:
- Click the action menu (⋮) beside the relevant user and select Stop server.
Click View server beside the relevant user and then click Stop notebook server.
The Stop server dialog box appears.
- Click Stop server.
If you want to stop all servers, perform the following actions:
- Click the Stop all servers button.
- Click OK to confirm stopping all servers.
Verification
- The Stop server link beside each server changes to a Start server link when the notebook server has stopped.
1.5.3. Revoking user access to Jupyter
You can revoke a user’s access to Jupyter by removing the user from the OpenShift AI user groups that define access to OpenShift AI. When you remove a user from the user groups, the user is prevented from accessing the OpenShift AI dashboard and from using associated services that consume resources in your cluster.
Follow these steps only if you have implemented OpenShift AI user groups to restrict access to OpenShift AI. To completely remove a user from OpenShift AI, you must remove them from the allowed group in your OpenShift identity provider.
Prerequisites
- You have stopped any notebook servers owned by the user you want to delete.
-
You are part of the
cluster-admins
ordedicated-admins
user group in your OpenShift cluster. Thededicated-admins
user group applies only to OpenShift Dedicated. - You are using OpenShift AI user groups, and the user is part of the user group, administrator group, or both.
Procedure
-
In the OpenShift web console, click User Management
Groups. Click the name of the group that you want to remove the user from.
-
For administrative users, click the name of your administrator group, for example,
rhoai-admins
. -
For non-administrator users, click the name of your user group, for example,
rhoai-users
.
The Group details page for the group appears.
-
For administrative users, click the name of your administrator group, for example,
- In the Users section on the Details tab, locate the user that you want to remove.
- Click the action menu (⋮) beside the user that you want to remove and click Remove user.
Verification
- Check the Users section on the Details tab and confirm that the user that you removed is not visible.
-
In the
rhods-notebooks
project, check under WorkloadsPods and ensure that there is no notebook server pod for this user. If you see a pod named jupyter-nb-<username>-*
for the user that you have removed, delete that pod to ensure that the deleted user is not consuming resources on the cluster. - In the OpenShift AI dashboard, check the list of data science projects. Delete any projects that belong to the user.
1.5.4. Backing up storage data
It is a best practice to back up the data on your persistent volume claims (PVCs) regularly.
Backing up your data is particularly important before you delete a user and before you uninstall OpenShift AI, as all PVCs are deleted when OpenShift AI is uninstalled.
See the documentation for your cluster platform for more information about backing up your PVCs.
Additional resources
1.5.5. Cleaning up after deleting users
After you remove a user’s access to Red Hat OpenShift AI or Jupyter, you must also delete the configuration files for the user from OpenShift. Red Hat recommends that you back up the user’s data before removing their configuration files.
Prerequisites
- (Optional) If you want to completely remove the user’s access to OpenShift AI, you have removed their credentials from your identity provider.
- You have revoked the user’s access to Jupyter.
- You have backed up the user’s storage data from Amazon EBS or Google Persistent Disk.
-
You have logged in to the OpenShift web console as a user with the
cluster-admin
role.
Procedure
Delete the user’s persistent volume claim (PVC).
-
Click Storage
PersistentVolumeClaims. -
If it is not already selected, select the
rhods-notebooks
project from the project list. Locate the
jupyter-nb-<username>
PVC.Replace
<username>
with the relevant user name.Click the action menu (⋮) and select Delete PersistentVolumeClaim from the list.
The Delete PersistentVolumeClaim dialog appears.
- Inspect the dialog and confirm that you are deleting the correct PVC.
- Click Delete.
-
Click Storage
Delete the user’s ConfigMap.
-
Click Workloads
ConfigMaps. -
If it is not already selected, select the
rhods-notebooks
project from the project list. Locate the
jupyterhub-singleuser-profile-<username>
ConfigMap.Replace
<username>
with the relevant user name.Click the action menu (⋮) and select Delete ConfigMap from the list.
The Delete ConfigMap dialog appears.
- Inspect the dialog and confirm that you are deleting the correct ConfigMap.
- Click Delete.
-
Click Workloads
Verification
- The user cannot access Jupyter any more, and sees an "Access permission needed" message if they try.
- The user’s single-user profile, persistent volume claim (PVC), and ConfigMap are not visible in OpenShift.