1. StreamNative Cloud
  2. Managed access

Work with users

As an administrator, you can invite users to your organization, as well as update and delete the current users.

Work with users through snctl

In this document, we named the organization matrix for an example

Create a user through snctl

To create a user, follow these steps.

  1. Define a user named ironman by using a manifest file and save the manifest file user-ironman.yaml.

    apiVersion: cloud.streamnative.io/v1alpha1
    kind: User
    metadata:
      namespace: matrix
      name: ironman
    spec:
      email: [email protected]
    

    The following table lists fields in the manifest file.

    FieldDescription
    apiVersionSpecify the version of Pulsar API server.
    kindSpecify the component to be created.
    metadataConfigure the metadata information about the user.
    - namespace: specify the name of the organization.
    - name: specify the name of the user.
    specSpecify the email address for the user.
  2. Apply the manifest file to create the user.

    snctl apply -f /path/to/user-ironman.yaml
    
  3. Check whether the user is created successfully.

    snctl describe users [email protected]
    

    Output

    Name:         [email protected]
    Namespace:    matrix
    Labels:       <none>
    Annotations:  <none>
    API Version:  cloud.streamnative.io/v1alpha1
    Kind:         User
    Metadata:
      Creation Timestamp:  2020-08-10T14:31:12Z
      Finalizers:
        user.finalizers.cloud.streamnative.io
      Generation:        1
      Resource Version:  104126
      Self Link:         /apis/cloud.streamnative.io/v1alpha1/namespaces/matrix/users/[email protected]
      UID:               5f6297c6-8e64-4175-b866-bb6362437f29
    Spec:
      Email:  [email protected]
    Status:
    Events:  <none>
    

Check users through snctl

You can use the following command to check users created for an organization.

snctl get users

Output

NAME                     CREATED AT
[email protected]   2020-08-10T14:31:12Z

Check user details through snctl

Before checking details about a user, you should use the following command to confirm whether the target user is available.

snctl get users

Then, you can use the following command to check details about a specific user.

snctl describe users USER_NAME

The following example checks details about the user [email protected].

snctl describe users [email protected]

Output

Name:         [email protected]
Namespace:    matrix
Labels:       <none>
Annotations:  <none>
API Version:  cloud.streamnative.io/v1alpha1
Kind:         User
Metadata:
  Creation Timestamp:  2020-08-10T14:31:12Z
  Finalizers:
    user.finalizers.cloud.streamnative.io
  Generation:        1
  Resource Version:  104126
  Self Link:         /apis/cloud.streamnative.io/v1alpha1/namespaces/matrix/users/[email protected]
  UID:               5f6297c6-8e64-4175-b866-bb6362437f29
Spec:
  Email:  [email protected]
Status:
Events:  <none>

Delete a user through snctl

You can use the following command to delete a specific user based on the user name.

snctl delete users USER_NAME

In addition, you can use the following command to delete the cluster based on the type and name specified in the manifest file.

snctl delete -f ./user-ironman.yaml

Work with users through StreamNative Cloud Console

This section describes how to work with users through the StreamNative Cloud Console.

Invite a user

To invite a user, follow these steps.

  1. If you are a member of multiple organizations, navigate to the organization you want to invite a user to. In the upper-right corner of the StreamNative Cloud Console, click your Profile and select Switch Organization to check your created organizations.

  2. On the Organization you want to invite teammates to, click Invite Teammates.

  3. On the User page, click Invite User and a dialog box displays.

  4. Enter the user's email address and then click Confirm.

Check users through StreamNative Cloud Console

In the upper-right corner of the StreamNative Cloud Console, click your Profile and select Users from the drop-down list to view the users for an organization, including the email address and status of the users.

Delete a user through StreamNative Cloud Console

As an administrator, you can delete a user.

To delete a user, follow these steps.

  1. In the upper-right corner of the StreamNative Cloud Console, click your Profile and select Users from the drop-down list.

  2. Click Delete in the Actions column.

  3. A dialog box displays asking, Are you sure you want to delete this user?

  4. Click Confirm.

Previous
Work with service account