The xFusionCorp Industries has recruited some new developers. There are already some existing jobs on Jenkins and two of these new developers need permissions to access those jobs. The development team has already shared those requirements with the DevOps team, so as per details mentioned below grant required permissions to the developers.
Click on the Jenkins button on the top bar to access the Jenkins UI. Login using username admin and password Adm!n321. m
- There is an existing Jenkins job named
Packages, there are also two existing Jenkins users namedsamwith passwordsam@pass12345androhanwith passwordrohan@pass12345. - Grant permissions to these users to access
Packagesjob as per details mentioned below: a.) Make sure to selectInherit permissions from parent ACLunderinheritance strategyfor granting permissions to these users. b.) Grant mentioned permissions tosamuser :build,configureandread. c.) Grant mentioned permissions torohanuser :build,cancel,configure,read,updateandtag.
Note:
- Please do not modify/alter any other existing job configuration.
- You might need to install some plugins and restart Jenkins service. So, we recommend clicking on
Restart Jenkins when installation is complete and no jobs are runningon plugin installation/update page i.eupdate centre. Also Jenkins UI sometimes gets stuck when Jenkins service restarts in the back end. In this case, please make sure to refresh the UI page. - For these kind of scenarios requiring changes to be done in a web UI, please take screenshots so that you can share it with us for review in case your task is marked incomplete. You may also consider using a screen recording software such as loom.com to record and share your work.
Understanding the Requirements
Task Overview
| Requirement | Details |
|---|---|
| Job Name | Packages |
| Users | sam, rohan |
| Inheritance Strategy | Inherit permissions from parent ACL |
| sam's Permissions | build, configure, read |
| rohan's Permissions | build, cancel, configure, read, update, tag |
User Credentials
| User | Password |
|---|---|
| admin | Adm!n321 |
| sam | sam@pass12345 |
| rohan | rohan@pass12345 |
Understanding Jenkins Security Concepts
What is Project-Based Security?
Project-based security allows you to configure permissions at the individual job level, rather than only at the global level. This provides granular control over who can do what on specific jobs.
Inheritance Strategies
| Strategy | Description |
|---|---|
| Inherit permissions from parent ACL | Combines global permissions with job-specific permissions |
| Inherit globally defined permissions | Only inherits global permissions |
| Do not inherit permission grants from other ACLs | Only uses permissions explicitly set on the job |
Permission Definitions
| Permission | Description |
|---|---|
| Job/Build | Trigger builds for the job |
| Job/Cancel | Cancel running builds |
| Job/Configure | Edit the job's configuration |
| Job/Read | View the job on the dashboard |
| Job/Update | Update parameterized builds |
| SCM/Tag | Create tags in the source code repository |
Step-by-Step Implementation
Step 1: Access Jenkins UI
- Click the Jenkins button on the top bar
- Login with:
-
Username:
admin -
Password:
Adm!n321
-
Username:
Step 2: Install the Matrix Authorization Strategy Plugin
Before configuring project-based security, we need to install the Matrix Authorization Strategy plugin.
- Navigate to Manage Jenkins → Plugins
- Click on Available plugins
- Search for Matrix Authorization Strategy
- Check the box and click Install
- If prompted, select Restart Jenkins when installation is complete and no jobs are running
- Refresh the UI page if needed after Jenkins restarts
Why this plugin? It provides the ability to configure fine-grained permissions at both global and job levels.
Step 3: Configure Global Security (Parent ACL)
This step is critical because users need at least Overall/Read permission to log in and see the Jenkins dashboard.
- Go to Manage Jenkins → Configure Global Security
- Under Authorization, select Project-based Matrix Authorization Strategy
- In the global permission matrix:
- Click Add user → Enter
sam→ Click OK - Click Add user → Enter
rohan→ Click OK
- Click Add user → Enter
- Grant permissions:
-
sam: Check
Overall/Read -
rohan: Check
Overall/Read -
admin: Ensure
Overall/Administeris checked (should already be)
-
sam: Check
- Click Save
Step 4: Enable Project-Based Security on the Packages Job
- Navigate to the Packages job on the Jenkins dashboard
- Click Configure in the left sidebar
- In the General section, check the box Enable project-based security
Important Note: The Authorization section (with inheritance strategy and permission matrix) will only appear AFTER you check this box. This is by design — Jenkins shows/hides sections based on the options you select.
Step 5: Configure the Inheritance Strategy
Once you check Enable project-based security, an Authorization section will appear below it.
- Under Inheritance Strategy, select:
Inherit permissions from parent ACL
- You will see a description confirming: > "This item will inherit its parent item's permissions (in addition to any permissions granted here). If this item is at the top level in Jenkins, it will inherit the global security settings."
Step 6: Add User sam and Grant Permissions
- Click the Add user button
- Enter the username:
sam - Click OK
- In the row for
sam, check the following permissions:
| Permission Category | Permission | Status |
|---|---|---|
| Job | Job/Build | ✓ |
| Job | Job/Configure | ✓ |
| Job | Job/Read | ✓ |
Summary for sam: Job: Build, Configure, Read
Leave all other permissions unchecked for sam.
Step 7: Add User rohan and Grant Permissions
- Click the Add user button
- Enter the username:
rohan - Click OK
- In the row for
rohan, check the following permissions:
| Permission Category | Permission | Status |
|---|---|---|
| Job | Job/Build | ✓ |
| Job | Job/Cancel | ✓ |
| Job | Job/Configure | ✓ |
| Job | Job/Read | ✓ |
| Run | Run/Update | ✓ |
| SCM | SCM/Tag | ✓ |
Summary for rohan: Job: Build, Cancel, Configure, Read · Run: Update · SCM: Tag
Leave all other permissions unchecked for rohan.
Step 8: Save the Configuration
- Click the Save button at the bottom left of the page
- The configuration will be applied immediately
Permission Matrix Visualization
After completing the configuration, the permission matrix should look like this:
┌─────────────────────┬─────────┬─────────┬───────────┐
│ Permission │ sam │ rohan │ Anonymous │
├─────────────────────┼─────────┼─────────┼───────────┤
│ Job/Build │ ✓ │ ✓ │ │
│ Job/Cancel │ │ ✓ │ │
│ Job/Configure │ ✓ │ ✓ │ │
│ Job/Read │ ✓ │ ✓ │ │
│ Job/Update │ │ ✓ │ │
│ SCM/Tag │ │ ✓ │ │
│ (other permissions) │ │ │ │
└─────────────────────┴─────────┴─────────┴───────────┘
Verification
Step 1: Log Out as Admin
- Click your profile icon (top right)
- Click Sign out
Step 2: Log in as sam
- Username:
sam - Password:
sam@pass12345 - Navigate to the Packages job
- Verify you can:
- See the job (Job/Read)
- Click Configure (Job/Configure)
- Click Build Now (Job/Build)
Step 3: Log in as rohan
- Log out from sam's session
- Username:
rohan - Password:
rohan@pass12345 - Navigate to the Packages job
- Verify you can:
- See the job (Job/Read)
- Click Configure (Job/Configure)
- Click Build Now (Job/Build)
- Cancel a running build (Job/Cancel)
- Update parameters (Run/Update)
- Tag in SCM (SCM/Tag)
Troubleshooting Common Issues
Issue 1: Authorization Section Not Visible
Symptom: The Authorization section doesn't appear on the job configuration page.
Cause: The "Enable project-based security" checkbox is not checked.
Solution: Check the Enable project-based security checkbox in the General section.
Issue 2: Users Cannot Log In
Symptom: Users get "Access Denied" when logging in.
Cause: Users don't have Overall/Read permission at the global level.
Solution: Add users to the global security matrix and grant Overall/Read.
Issue 3: Job Not Visible to Users
Symptom: Users can log in but cannot see the Packages job.
Cause: Users lack Job/Read permission on the specific job.
Solution: Grant Job/Read permission in the project-level matrix.
Issue 4: Matrix Option Not Available
Symptom: "Project-based Matrix Authorization Strategy" is not listed in the Authorization options.
Cause: The Matrix Authorization Strategy plugin is not installed.
Solution: Install the plugin from Available Plugins and restart Jenkins.
Issue 5: Wrong Inheritance Strategy
Symptom: Users have more or fewer permissions than intended.
Cause: The wrong inheritance strategy was selected.
Solution: Change the inheritance strategy to Inherit permissions from parent ACL.
Best Practices for Jenkins Project Security
1. Principle of Least Privilege
Grant only the permissions that users absolutely need. Avoid giving broad permissions like Job/Delete or Overall/Administer unless necessary.
2. Use Groups Instead of Individual Users
For larger teams, use Jenkins groups (backed by LDAP or Active Directory) instead of managing individual users.
3. Regular Audits
Periodically review the permission matrix to ensure users have appropriate access. Remove permissions for users who no longer need them.
4. Document Permission Changes
Keep a record of who has what permissions and why. This helps during audits and troubleshooting.
5. Test with Non-Admin Accounts
Always verify permissions by logging in as the actual user, not just as an administrator.
Key Learnings
Project-Based Security: Jenkins allows granular permission management at the job level using the Matrix Authorization Strategy plugin.
Inheritance Strategy: The "Inherit permissions from parent ACL" strategy combines global and job-level permissions, ensuring users have at least the global
Overall/Readpermission.Conditional UI: The Authorization section in job configuration only appears after checking the "Enable project-based security" checkbox.
Permission Verification: Always verify permissions by logging in as the actual user.
Principle of Least Privilege: Grant only the permissions required for each user's role.
Task Summary
| Requirement | Status |
|---|---|
| Matrix Authorization Strategy plugin installed | ✅ |
Global security configured with Overall/Read for sam and rohan |
✅ |
| Project-based security enabled on Packages job | ✅ |
| Inheritance Strategy: Inherit permissions from parent ACL | ✅ |
| sam granted: build, configure, read | ✅ |
| rohan granted: build, cancel, configure, read, update, tag | ✅ |
| No other job configuration modified | ✅ |
Configuration Summary
sam's Permissions
Job: Build, Configure, Read
rohan's Permissions
Job: Build, Cancel, Configure, Read
Run: Update
SCM: Tag
Inheritance Strategy
Inherit permissions from parent ACL
Screenshots for Documentation
Make sure to capture the following screenshots for review:
-
Global Security Configuration – Showing
samandrohanwithOverall/Read - Project-Based Security Enabled – The checkbox checked in the Packages job
- Inheritance Strategy – "Inherit permissions from parent ACL" selected
- Permission Matrix – Showing the permissions for sam and rohan
- Verification – Logged in as sam and rohan accessing the Packages job
Summary
In this challenge, we successfully:
- Accessed the Jenkins UI and logged in as admin
- Installed the Matrix Authorization Strategy plugin
- Configured global security with
Overall/Readfor both users - Enabled project-based security on the Packages job
- Selected the correct inheritance strategy
- Granted the appropriate permissions to sam and rohan
- Verified the configuration by logging in as each user
This setup demonstrates how Jenkins project-based security provides fine-grained control over user permissions, following the Principle of Least Privilege. The developers now have exactly the permissions they need to perform their tasks without unnecessary access.
Top comments (0)