Create Users

You can create users for HPE Machine Learning Inferencing Software via the CLI as an admin user.

Before You Start

  • Ensure that you have the necessary permissions to create a user.
  • Review the User Roles to understand the different roles available in HPE Machine Learning Inferencing Software.

How to Create a User

Via the CLI

  1. Sign in as an admin.
    aioli user login admin
  2. Create a user.
    aioli user create [-h] [--admin] [--display-name DISPLAY_NAME] [--remote] [--role ROLE] username

Assigning Roles

If the --role ROLE is omitted, the role Viewer will be assigned to the user.

Remote Users

A remote user only needs to be created if oidc.autoProvisionUsers was set to false at install time, and must be created with the same username that the user will use to log into the identity provider (e.g., username@gmail.com ).

By default, oidc.autoProvisionUsers is set to true, which means that upon successful authentication by the identity provider, the user is automatically added to the database and, therefore, there is no need to manually add the user to the database with the CLI or REST API.

Specifying the --remote option indicates that the user will log into MLIS using an existing external user account from the identity provider that was configured when the platform was installed.

Via the API

  1. Sign in to HPE Machine Learning Inferencing Software.
    curl -X 'POST' \
      '<YOUR_EXT_CLUSTER_IP>/api/v1/login' \
      -H 'accept: application/json' \
      -H 'Content-Type: application/json' \
      -d '{
      "username": "<YOUR_USERNAME>",
      "password": "<YOUR_PASSWORD>"
    }'
  2. Obtain the Bearer token from the response.
  3. Send a POST request to create a user.
    curl -X 'POST' \
         '<YOUR_EXT_CLUSTER_IP>/api/v1/users' \
         -H 'accept: application/json' \
         -H 'Content-Type: application/json' \
         -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
         -d '{
           "active": true,
           "displayName": "<DISPLAY_NAME>",
           "remote": false,
           "roleName": "<ROLE_NAME>",
           "username": "<USERNAME>"
         }'