With the Tanzu Salt Role Based Access Control (RBAC) system, you can define permission settings for multiple users at once, as permission settings for a role apply to all users included in the role. You can define these settings in the Roles workspace in the user interface.
To define user roles, you must have administrator access.
Tanzu Salt ships with many built-in roles that cannot be deleted.
root
is assigned to the Superuser role. The role cannot be deleted or cloned. You can add any group or user to the role, but you cannot modify any of the role’s other settings. Only advanced users should be added to the Superuser role, as it effectively bypasses permissions restrictions.Additionally, you can create custom-defined roles for your organization’s unique needs.
To give a role permission to complete a task, you must both define the permitted task, and also assign access to a resource or functional area. A permission is a broad category of allowed actions, whereas resource access allows you to define a specific resource (for example, a job or target) the action can be completed against.
Resource access for certain resource types and functional areas must be defined in the API (RaaS), rather than the Roles editor.
After creating a role, you can choose to clone it, set permitted tasks, and assign access to a job or target.
To define a role for role-based access controls (RBAC) in Tanzu Salt, you must both define the permitted task and also assign resource access. A task is a specific operation that can be performed in the user interface, such a creating, editing, or running a job. A resource is an element of your environment, such specific masters, minions, targets, file data, etc.
A permitted task is broad category of allowed actions, whereas resource access is more granular, allowing you to specify a particular resource (such as a job or target) the action can be run against.
In this example, a role can run test.ping
on the Linux target group with these permissions settings:
test.ping
commandThe Tasks tab includes the following options.
Task | Description |
---|---|
Create and delete new targets | Role can create new targets. Users assigned to this role can edit and delete targets they have created, or other targets defined under Resource Access. A target is the group of minions, across one or many Salt masters, that a job’s Salt command applies to. A Salt master can also be managed like a minion and can be a target if it is running the minion service. See How do I create targets. Note:
|
Modify pillar data | Role can view, edit, and delete sensitive information stored in pillars. Users belonging to the role can edit or delete pillars they have created. They can also edit or delete other pillars if granted resource access (available through the API (RaaS) only). Pillars are structures of data defined on the Salt master and passed through to one or more minions, using targets. They allow confidential, targeted data to be securely sent only to the relevant minion. See How do I create state files and pillar data. |
Modify file server | Role can view the file server, and can create, edit, or delete files. Users belonging to the role can edit or delete files they have created. They can also edit or delete other files if granted resource access (available through the API (RaaS) only). The file server is a location for storing both Salt-specific files, such as top files or state files, as well as files that can be distributed to minions, such as system configuration files. See How do I create state files and pillar data. |
Run arbitrary commands on minions | Role can trigger commands outside of a job for the Salt master to pick up. Role is not limited to running only commands included in a given job’s definition. Minions are nodes running the minion service, which can listen to commands from a Salt master and perform the requested tasks. |
Accept, delete, and reject minion keys | Role can accept, delete, and reject minion keys as needed for initial configuration. A minion key allows encrypted communication between a Salt master and Salt minion. The Superuser role is required to accept minion keys. |
Read and modify users, roles, permissions | Role can view users and associated data, as well as edit roles and permissions settings. Note: This task applies only to the built-in Administrator and Superuser roles. Roles are used to define permissions for multiple users who share a common set of needs. |
Run commands on Salt masters | Role can run commands on Salt masters, such as to run orchestration. Commands run against the Salt master are also called Salt runners. Salt runners are modules used to execute convenience functions on the Salt master. See How do I create jobs.Adding this permission allows the role to be able to use the |
Compliance - create, edit, delete, and assess | Role can create, edit, delete, and assess Tanzu Salt Compliance Cloud policies. In addition to granting permission for this task, you must also define resource access for any targets you want the role to perform actions on. For example, if you want the This task does not allow the role to remediate Tanzu Salt Compliance Cloud policies. |
Compliance - remediate | Role can remediate any non-compliant minions detected in a Tanzu Salt Compliance Cloud assessment. |
Compliance - update Tanzu Salt content | Role can download updates to the Tanzu Salt Compliance Cloud security library. |
Vulnerability - create, edit, delete, and assess | Role can create, edit, delete, and assess Tanzu Salt Vulnerability Cloud policies. In addition to granting permission for this task, you must also define resource access for any targets you want the role to run assessments against. This task does not allow the role to remediate Tanzu Salt Vulnerability Cloud policies. |
Vulnerability - remediate | Role can remediate vulnerabilities detected in a Tanzu Salt Vulnerability Cloud assessment. |
The Resource Access tab allows you to define resource access for targets and jobs. A target is the group of minions, across one or many Salt masters, that a job’s Salt command applies to. A Salt master can also be managed like a minion and can be a target if it is running the minion service. Jobs are used to run remote execution tasks, apply states, and start Salt runners.
Note:
Resource types not defined in the table do not require any specific resource access settings.
Resource Type | Access Levels |
---|---|
Targets |
|
Jobs |
|
Other Resource types - access to these resource types must be defined using the API (RaaS)
|
Defined in the API (RaaS) |
To define user roles, you must have administrator access.
From the side menu, click Administration > Roles.
Click Create and enter a name for your role.
Under Tasks, select permitted actions to grant for the role.
Click Save.
To assign access to a job or target, select the role from the Roles workspace, locate the required job or target under Resource Access, and select the access level desired. For example, to allow a role to run jobs, select Read/Run, and click Save.
(Optional) To include groups, select the role from the Roles workspace, select the groups you want to include from Groups, and click Save.
Note:
Role permissions are additive. Users in groups assigned to multiple roles receive access to a combination of all items granted from each role. The selected groups, including all users in those groups, are granted all permitted tasks and resource access defined in the role settings.
(Optional) To clone a role select the role from the Roles workspace, click Clone, enter a new name for the role, and click Save.
Note:
Cloned roles inherit permitted tasks from the original role by default. Cloned roles do not inherit resource access, which must be defined separately.
(Optional) In some situations you may need to configure more granular permissions. To grant Advanced permissions, click Administration > Roles > Advanced, select the role and select or deselect additional permissions. Click Save. For more information on Advanced permission and item types see Advanced permission and item types.
Note:
The minimum recommended permissions for typical user operations are highlighted in blue.