Este conteúdo não está disponível no idioma selecionado.

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.

Table 1.1. User types
User TypePermissions

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:

  • Configure Red Hat OpenShift AI settings.
  • Access and manage notebook servers.
  • Access and manage data science pipeline applications for any data science project.

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 groups defined in your configured identity provider, you can add these groups to your OpenShift AI deployment. If you decide to use 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-admin role. Those operations include:

  • Adding users to the OpenShift AI user and administrator groups, if you are using groups.
  • Removing users from the OpenShift AI user and administrator groups, if you are using groups.
  • Managing custom environment and storage configuration for users in OpenShift, such as Jupyter notebook resources, ConfigMaps, and persistent volume claims (PVCs).
Important

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.

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 in OpenShift.
  • You have configured a supported identity provider for OpenShift.

Procedure

  1. In the OpenShift web console, click User Management Groups.
  2. 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.

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.

Important

If you are using LDAP as your identity provider, you need to configure LDAP syncing to OpenShift. For more information, see Syncing LDAP groups.

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 OpenShift.
  • You are assigned the cluster-admin role in OpenShift.
  • You have defined an administrator group and user group for OpenShift AI.

Procedure

  1. In the OpenShift web console, click User Management Groups.
  2. 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.

  3. Click Actions Add Users.

    The Add Users dialog appears.

  4. In the Users field, enter the relevant user name to add to the group.
  5. 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

  1. From the OpenShift AI dashboard, click Settings User management.
  2. 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.
  3. 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.

    Important

    The system:authenticated setting allows all users authenticated in OpenShift to access OpenShift AI.

  4. 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

  1. On the page that opens when you launch Jupyter, click the Administration tab.
  2. Stop one or more servers.

    • If you want to stop one or more specific servers, perform the following actions:

      1. In the Users section, locate the user that the notebook server belongs to.
      2. 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.

      3. Click Stop server.
    • If you want to stop all servers, perform the following actions:

      1. Click the Stop all servers button.
      2. 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.

Important

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 assigned the cluster-admin role in OpenShift.
  • You are using OpenShift AI user groups, and the user is part of the user group, administrator group, or both.

Procedure

  1. In the OpenShift web console, click User Management Groups.
  2. 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.

  3. In the Users section on the Details tab, locate the user that you want to remove.
  4. 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 Workloads Pods 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.
  • You have logged in to the OpenShift web console as a user with the cluster-admin role.

Procedure

  1. Delete the user’s persistent volume claim (PVC).

    1. Click Storage PersistentVolumeClaims.
    2. If it is not already selected, select the rhods-notebooks project from the project list.
    3. Locate the jupyter-nb-<username> PVC.

      Replace <username> with the relevant user name.

    4. Click the action menu (⋮) and select Delete PersistentVolumeClaim from the list.

      The Delete PersistentVolumeClaim dialog appears.

    5. Inspect the dialog and confirm that you are deleting the correct PVC.
    6. Click Delete.
  2. Delete the user’s ConfigMap.

    1. Click Workloads ConfigMaps.
    2. If it is not already selected, select the rhods-notebooks project from the project list.
    3. Locate the jupyterhub-singleuser-profile-<username> ConfigMap.

      Replace <username> with the relevant user name.

    4. Click the action menu (⋮) and select Delete ConfigMap from the list.

      The Delete ConfigMap dialog appears.

    5. Inspect the dialog and confirm that you are deleting the correct ConfigMap.
    6. Click Delete.

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.
Red Hat logoGithubRedditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja oBlog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

© 2024 Red Hat, Inc.