Jenkins
Exploring the Jenkins UI
Managing users and teams
In this article, we explore how to manage users and teams in Jenkins, a critical process for ensuring proper access control. By following these step-by-step instructions, you can efficiently set up and update user roles, access permissions, and security settings.
Creating a New User
To add a new user:
- Navigate to Manage Jenkins and scroll down to the security section.
- Click on Global Security to view options for managing user access, configuring credentials providers, and handling user accounts.
- Select Manage Users, then enter the user details. For example, use a username like
testuser
along with a password, full name, and email address. - Once all required fields are complete, click Create User.
After creating the user, click the settings icon (often represented by a gear) next to the user's name. Here, you can update the name, add descriptions (e.g., “Works in the front-end dev department”), generate API tokens, modify email settings, configure notification URLs, change passwords, and manage public keys.
Installing a Role-Based Authorization Plugin
Jenkins does not include role-based access control by default. To implement role-based strategies:
- Go to Manage Plugins and click on the Available tab.
- Use the search field to locate the plugin by entering “role.” This plugin facilitates user authorization based on a role-based strategy.
- Click on the desired plugin and select Install without restart to complete the installation process.
Managing and Assigning Roles
With the plugin installed, you can now manage and assign user roles.
- Return to Manage Jenkins and scroll down to Manage and Assign Roles.
- First, click on Assign Roles to view the available role assignment options.
The interface includes guidance on Role Strategy Macros for extending user access control.
To add a new role:
- Navigate to Manage Roles.
- Define a new role, such as developer, and customize its permissions as needed.
- Click Save to preserve the new role configuration.
Then, go back to Assign Roles and assign the appropriate roles to users or groups. For instance, you might assign the developer role to an anonymous user for limited access.
Finally, click Save to apply these changes, completing the role assignment process.
Note
Remember, keeping your role assignments up-to-date is vital for maintaining a secure Jenkins environment.
This concludes our guide on managing users and teams in Jenkins. We hope you found this tutorial useful. Stay tuned for more insights and best practices in managing your Jenkins environment.
Watch Video
Watch video content