Jenkins — How to create Users + Manage + Assign Roles (Part 2)

  • How to configure Users?
  • How to create new Roles?
  • How to assign users to Roles?
  • How to control user access on Projects?
Login screen

How to create new Users?

If you want to create a new User in Jenkins you need to go to

Manage Jenkins-> Manage Users
Add New User steps
Manage User option
Create New User
Username of the Logged User

How to configure Users?

On the right top corner, there is the Username. Besides that, there is a dropdown. Just go to the “Configure” option. Now here you will come to the configure window of Jenkins for the particular User. Here you can,

  • Add any Description
  • Get the API token for the specific User
  • Change your Password
  • Can set any public-key authentication
Configure Users

How to create new Roles?

In general, we can define roles to every user. For example, Admin User has all the roles such as defining roles, create Users, configure the system, give access to the projects, and so on. The manager only can view the projects. Developers should be able to do make changes to the specific project and Testers should be able to access only to the Testing projects. So how can we manage that? To do that we have a plugin called Roles Strategy plugin.

  • Download and install via Jenkins
Manage Jenkins -> Maganage Plugins
Manage Jenkins -> Configure Global Security 
Select Role-based Strategy
User1 missing the Overall read permissions
Manage Jenkins -> Manage and Assign Roles -> Manage Roles 
Employee role access

How to assign users to Roles?

Go to,

Manage Jenkins -> Manage and Assign Roles -> Assign Roles
Assigning Global Roles
Assigning Item Roles

How to control user access on Projects?

Now we have created all the roles and we assigned them to Users. Let’s create 2 projects and check the access according to the Users. Go to,

New Item -> Enter an Item Name 
DevProject1
Project Dashboard
User1 Access
User2 Access

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store