Bookmark this page

Guided Exercise: Creating and Managing Users and Groups in Private Automation Hub

  • Create users and groups in private automation hub and assign appropriate access permissions to the groups.

Outcomes

  • Create users and groups in private automation hub.

  • Assign appropriate access permissions to the groups.

As the student user on the workstation machine, use the lab command to prepare your system for this exercise.

This command ensures that private automation hub is installed.

[student@workstation ~]$ lab start org-hub

Procedure 2.3. Instructions

  1. Create a new group called Developers and assign permissions to manage Ansible Content Collections and containers in private automation hub.

    1. Navigate to https://hub.lab.example.com and log in as the admin user with redhat as the password.

    2. Navigate to User AccessGroups and then click Create.

    3. Enter Developers in the Name field and then click Create.

    4. Click Edit. In the Collection Namespaces object list, select the following permissions:

      • Add namespace

      • Change namespace

      • Delete namespace

      • Upload to namespace

    5. In the Collections object list, select the following permissions:

      • Delete collection

      • Modify Ansible repo content.

    6. In the Containers object list, select the following permissions:

      • Change container namespace permissions

      • Change containers

      • Change image tags

      • Create new containers

      • Delete container repository

      • Push to existing containers

    7. Click Save to create the new group.

  2. Create a new group called Image Managers and assign permissions to manage images in private automation hub.

    1. Navigate to User AccessGroups and then click Create.

    2. Enter Image Managers in the Name field and then click Create.

    3. Click Edit. In the Containers object list, select the following permissions:

      • Change containers

      • Change image tags

      • Create new containers

      • Delete container repository

      • Push to existing containers

    4. Click Save to create the new group.

  3. Create a new group called Operations and assign all the permissions to all the objects in private automation hub.

    1. Navigate to User AccessGroups and then click Create.

    2. Enter Operations in the Name field and then click Create.

    3. Click Edit and for each object select all the permissions.

    4. Click Save to create the new group.

  4. Create a new user called daniel and add the user to the Developers group.

    1. Navigate to User AccessUsers and then click Create.

    2. On the Create new user page, fill in the details as follows and click Save to create the new user.

      FieldValue
      Username daniel
      First name Daniel
      Last name George
      Email daniel@lab.example.com
      Password redhat123
      Password confirmation redhat123
      Groups Developers
      User type Not a super user
  5. Create a new user called oliver and add the user to the Operations group.

    1. Navigate to User AccessUsers and then click Create.

    2. On the Create new user page, fill in the details as follows and click Save to create the new user.

      FieldValue
      Username oliver
      First name Oliver
      Last name Stone
      Email oliver@lab.example.com
      Password redhat123
      Password confirmation redhat123
      Groups Operations
      User type Not a super user
  6. Create a new user called simon as a super user.

    1. Navigate to User AccessUsers and then click Create.

    2. On the Create new user page, fill in the details as follows and click Save to create the new user.

      FieldValue
      Username simon
      First name Simon
      Last name Stephens
      Email simon@lab.example.com
      Password redhat123
      Password confirmation redhat123
      Groups (no group)
      User type Super user
  7. Verify the permissions for the Developers group by creating a namespace and then uploading a content collection.

    1. Log out from the private automation hub web UI and log in as daniel with redhat123 as the password.

    2. Navigate to CollectionsNamespaces and then click Create.

    3. On the Create new namespace page, fill in the details as follows and click Create to create the new namespace.

      FieldValue
      Name community
      Namespace owners Developers

      Important

      The group must be a namespace owner in order to upload to the namespace. Adding a group as namespace owner provides Change namespace and Upload to namespace permissions to the group.

    4. Click Upload collection.

    5. Click Select file, select the archive located at /home/student/content-collections/community/community-mysql-3.1.1.tar.gz, and then click Upload.

    6. After the upload completes successfully, click CollectionsApproval.

    7. Click Approve to approve the community.mysql content collection.

    8. Navigate to CollectionsCollections and verify that the private automation hub server displays the mysql automation content collection.

  8. Confirm that user simon has all permissions, as the super user.

    1. Log out from the private automation hub web UI and log in as simon with redhat123 as the password.

    2. Navigate to User accessUsers and confirm that Create button is enabled. It means user simon has permission to create new users.

    3. Navigate to CollectionsNamespaces and confirm that Create button is enabled. It means user simon has permission to create new namespaces.

    4. Navigate to Execution EnvironmentsExecution Environments and confirm that Add execution environment is enabled. It means user simon has permission to add new execution environment.

    5. Log out from the private automation hub web UI.

Finish

On the workstation machine, change to the student user home directory and use the lab command to complete this exercise. This step is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish org-hub

This concludes the section.

Revision: do467-2.2-08877c1