Configuring a Project-based Matrix Authorization Strategy
Project-based Matrix Authorization Strategy
is an extension of Matrix-based security
. It allows an access control list matrix to be defined for project. This feature is very useful when we want to give access to specific jobs to specific users so that the security of Jenkins is not compromised.
Getting ready
Go to Manage Jenkins
| Global Security Configuration
.
How to do it...
- In the
Authorization
section, selectProject-based Matrix Authorization Strategy
. - Give
admin
all rights andSave
:

- Go to the incognito window where we logged in using the credentials of
Shreyansh
.
- Refresh the page and we will get
Access Denied
. The reason is that we haven't given any rights toShreyansh
inProject-based Matrix Authorization Strategy
:

- We need to provide overall
Read
rights soShreyansh
can access the Jenkins dashboard:

- Now, go to the individual build job as an admin and select
Enable project-based security
in the job configuration page.
- Add
Shreyansh
as...