Creating and managing local users and user roles
Role-based access control (RBAC) in Puppet Enterprise (PE) lets you to manage users—what they can and can't create, edit, or view—in an organized, high-level way that is more efficient than managing user permissions on a per-user basis. User roles are sets of permissions you can apply to multiple users. You can't assign permissions directly to users in PE, only to user roles. You then assign roles to users.
- Administrator: A user that has the Administrator role applied by default. This means this user has every permission. You can revoke the Administrator user in situations where users are managed through a directory service, like LDAP.
- API User: Used for service-to-service authentication within PE. You can't use it with the standard login, and you can't revoke it. It is only available through certificate-based authentication. The RBAC allow list identifies the certificates (by certname) that you can use for API User authentication.
Create a user
These steps add a local user.
- In the console, on the Access control page, click the Users tab.
- In the Full name field, enter the user's full name.
- In the Login field, enter a user name for the user.
- Click Add local user.
Give a user access to the PE console
When you create local users, you need to send them a password reset token that allows them to log in to PE for the first time.
- On the Access control page, on the Users tab, select the user's full name.
- Click Generate password reset.
- Copy the link provided in the message and send it to the new user.
Create a user role
Puppet Enterprise (PE) includes five default roles. You can also create your own roles.
For information about the five default roles, refer to User permissions and user roles.
Users with the appropriate permissions, such as Administrators, can create custom roles. To avoid unintentional privilege escalation, make sure the only users who can edit user roles are those who have all permissions (meaning Administrators). For more information, refer to Best practices for assigning permissions.
- In the console, on the Access control page, click the User roles tab.
- In the Name field, enter a name for the new user role.
- Optional: In the Description field, enter a description of the new user role.
- Click Add role.
Assign permissions to a user role
You can mix and match permissions to create custom user roles that provide users with precise access to Puppet Enterprise (PE) actions.
- On the Access control page, on the User roles tab, select a user role.
- Click Permissions.
- In the Type field, select the type of object you want to assign permissions for, such as Node groups.
- In the Permission field, select the permission you want to assign, such as View.
- In the Object field, select the specific object you want to assign the permission to. For example, if you are setting a permission to view node groups, select a specific node group this user role has permissions to view.
- Click Add permission, and commit changes.
Add a user to a user role
When you add a user to a role, the user gains the permissions you assign to that role. A user can't do anything in PE until they have been assigned to at least one role. If users are assigned to multiple roles, they get all permissions from all roles they are assigned to.
- On the Access control page, on the User roles tab, select a user role.
- Click Member users.
- In the User name field, select the user you want to add to the user role.
- Click Add user, and commit changes.
Remove a user from a user role
When you remove a user from a role, the user loses the permissions associated with that role. If you remove all roles from a user, the user can't do anything in PE until they are assigned to at least one role.
- On the Access control page, on the User roles tab, select a user role.
- Click Member users.
- Locate the user you want to remove from the user role. Click Remove, and commit changes.
Revoke or reinstate user access
If you want to stop a user from accessing PE without deleting their account, you can revoke the user. Users are automatically revoked if they have too many incorrect password attempts. This is also referred to as locking a user's account. You can use these steps to revoke users or reinstate revoked users.
Change account expiration settings
You can specify the number of days before an inactive user's account is automatically revoked. You can also specify how often Puppet Enterprise (PE) checks for idle user accounts.
rbac_account_expiry_days
The rbac_account_expiry_days
parameter is a positive
integer specifying the duration, in days, before an inactive user account expires.
If a user (who isn't a superuser) doesn't log in to the PE console at least once during the specified period,
their user's access is automatically revoked.
The default value is undefined, meaning no expiration limit. To activate this setting
in the console, specify a value of 1
or greater for
the rbac_account_expiry_days
parameter in the
puppet_enterprise::profile::console
class of the PE
Infrastructure node group. The value corresponds to the number of
days an account can be idle before being revoked. For example, 30
would be 30 days.
account_expiry_days
parameter is not specified, or has a value of less than 1
, the account_expiry_check_minutes
parameter is ignored.rbac_account_expiry_check_minutes
The rbac_account_expiry_check_minutes
parameter is a
positive integer that specifies how often, in minutes, PE checks for idle user accounts. The default value
is 60
minutes.
To change this setting in the console, set a value (representing a number of minutes)
of the rbac_account_expiry_check_minutes
parameter in the
puppet_enterprise::profile::console
class of the PE
Infrastructure group.
Delete a user
You can delete a user through the Puppet Enterprise (PE) console. This deletes only the user's PE account. It does not delete the user's listing in any external directory service.
Delete a user role
You can delete a user role through the Puppet Enterprise (PE) console.
- In the console, on the Access control page, click the User roles tab.
- In the Name column, locate the role you want to delete.
- Click Remove.