Is there a way to restrict permissions to a user per individual job in jenkins

+3 votes
I have a list of Jenkin jobs and i want a user (say user1) to have read permission on few jobs and all (full) permissions on other jobs.Is there a way i can restrict the permissions as per this in jenkins?
May 28, 2019 in Jenkins by Sam
• 6,260 points
112,379 views

2 answers to this question.

+3 votes

Yes, you can configure user permissions per individual jobs.
Jenkins allows you to give different permissions to a user across different jobs,using "Project-based Matrix Authorization strategy".
Follow the steps to do this, 

  •  From the jenkins dashboard,click on Manage Jenkins.

  •  under Manage jenkins->Configure Global Security->select Enable security.

  •  Under the Authorization section, select the "Project-based Matrix Authorization Strategy"

  •  Add the particular user and assign the appropriate permissions.

  • And then to assign Job specific permissions :

    • Go to the job (say job1) for which you need to assign permissions.

    • Click Configure->under the general tab->Enable Project-based Security.

    •  Add the particular user (say user1) and assign the required permissions.

This is useful when specific jobs shouldn't be accessed by certain users.

answered May 28, 2019 by Sirajul
• 59,230 points

edited May 28, 2019 by Sirajul
This doesn't really stop users/developers viewing the other jobs, Is there any way that allow user user just to view and build a particular job

Hi,

I am not sure it will work or not. But you can try once.

  •  install the Authorize Project plugin.
  • Go to manage jenkins->configure global security->access control for builds->Run as user who triggered->save
  • Create one job
  • Go to configuration-> build environment->bind one user who can run the job.
Now that particular user can only handle that job.

0 votes

Hi,

Project-based Matrix Authorization Strategy is an authorization method using which we can define which user or group can do what actions on which job. This gives us fine-grained control over user/group permissions per project.

answered Dec 14, 2020 by MD
• 95,460 points

Related Questions In Jenkins

+1 vote
4 answers

Is there a way to change the Jenkins build number while building a job?

If you have access to the script ...READ MORE

answered May 7, 2019 in Jenkins by Atul
29,708 views
0 votes
1 answer

is there a way how to finish in-progress slave builds if Jenkins master goes offline

Hi@, You can assign your Jenkins Job to ...READ MORE

answered Jun 30, 2020 in Jenkins by MD
• 95,460 points
3,688 views
0 votes
1 answer
0 votes
1 answer

How to set permissions for a user in Jenkins?

Hi@akhtar, You can give access to your user ...READ MORE

answered Dec 7, 2020 in Jenkins by MD
• 95,460 points
36,598 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,033 views
+2 votes
1 answer
+1 vote
3 answers

How to auto build a job in jenkins if there is any change in code on Github repository?

To automatically run build on code commit, follow ...READ MORE

answered Jul 31, 2019 in Jenkins by Sirajul
• 59,230 points
78,756 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP