Workshop Exercise - Role-based access control

Read this in other languages:
uk English, japan日本語, brazil Portugues do Brasil, france Française, Español Español.

Table Contents

Objective

You have already learned how Ansible automation controller separates credentials from users. Another advantage of Ansible automation controller is the user and group rights management. This exercise demonstrates Role Based Access Control (RBAC)

Guide

Ansible automation controller users

There are three types of automation controller users:

Let’s create a user:

Parameter Value
Username wweb
Email wweb@example.com
Password ansible
Confirm Password ansible
First Name Werner
Last Name Web
Organization Default
User Type Normal User

Ansible automation controller teams

A Team is a subdivision of an organization with associated users, projects, credentials, and permissions. Teams provide a means to implement role-based access control schemes and delegate responsibilities across organizations. For instance, permissions may be granted to a whole Team rather than each user on the Team.

Create a Team:

Add a user to the team:

Click Save.

Permissions allow to read, modify, and administer projects, inventories, and other automation controller elements. Permissions can be set for different resources.

Granting permissions

To allow users or teams to actually do something, you have to set permissions. The user wweb should only be allowed to modify content of the assigned webservers.

Add the permission to use the Create index.html template:

Test permissions

Now log out of automation controller’s web UI and in again as the wweb user.

Check the result: execute curl again on the control host to pull the content of the webserver on node1 (you could of course check node2 and node3, too):

#> curl http://node1

Just recall what you have just done: You enabled a restricted user to run an Ansible playbook

Effectively you provided the power to execute automation to another user without handing out your credentials or giving the user the ability to change the automation code. And yet, at the same time the user can still modify things based on the surveys you created.

This capability is one of the main strengths of Ansible automation controller!


Navigation
Previous Exercise - Next Exercise

Click here to return to the Ansible for Red Hat Enterprise Linux Workshop