Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restricting visibility of Jenkins jobs to specific users

Tags:

jenkins

In Jenkins, is there a way to restrict certain jobs so that only specific users can view them?

Jenkins allows the restriction of user-abilities-per-project via the "Project-based Matrix Authorization Strategy". The problem is that a user can not access anything without the 'Overall' 'Read' setting. This seems to allow them to view all jobs.

Is there another plugin that would allow job visibility restrictions?

like image 454
ulrichenslin Avatar asked Nov 30 '11 08:11

ulrichenslin


People also ask

How do I restrict Jenkins jobs to execute on a specific machine?

Set the "Restrict where this job can be run" check box in your job configuration and specify the name of your slave. If you add more slaves later, you can set labels for each slave and specify those in your job configs.

How do I restrict views in Jenkins?

From the Jenkins dashboard, click on Manage Jenkins. Under Manage jenkins->Configure Global Security-> Select Enable security. Under the Authorization section, use Jenkins "Project-based Matrix Authorization Strategy" Add the particular user you want to authorize and assign the appropriate permissions.

How do I hide a job in Jenkins?

Try going to "Manage Jenkins"->"Manage Users" go to the specific user, edit his/her configuration "My Views section" default view. This only hides the job from the user, it doesn't prevent access to it.


2 Answers

Think this is, what you are searching for: Allow access to specific projects for Users

Short description without screenshots:
Use Jenkins "Project-based Matrix Authorization Strategy" under "Manage Jenkins" => "Configure System". On the configuration page of each project, you now have "Enable project-based security". Now add each user you want to authorize.

like image 70
Christian Avatar answered Sep 22 '22 01:09

Christian


Only one plugin help me: Role-Based Strategy :

wiki.jenkins-ci.org/display/JENKINS/Role+Strategy+Plugin

But official documentation (wiki.jenkins-ci.org/display/JENKINS/Role+Strategy+Plugin) is deficient.

The following configurations worked for me:

configure-role-strategy-plugin-in-jenkins

Basically you just need to create roles and match them with job names using regex.

like image 42
JRichardsz Avatar answered Sep 22 '22 01:09

JRichardsz