Users, Authentication Realms, Authorization Strategies, Matrix Permissions, Folders, and Least Privilege: Configuration, Design Choices, and Tradeoffs
Choose Jenkins identity and authorization designs across internal/external realms, matrix/role models, folder scoping, and service identities.
Learning objectives
- Choose between Jenkins internal users and an external security realm based on lifecycle and trust requirements.
- Compare matrix authorization with role-oriented plugin models without assuming one fits every organization.
- Place permissions at the narrowest practical global/folder/item scope and reason about inheritance explicitly.
- Separate human administrator identities from automation/service identities.
- Evaluate maintainability, plugin risk, auditability, recovery, and failure isolation.
1. Access control is architecture, not checkbox collection
A matrix can be syntactically valid and still be a poor system design. The architecture must answer who owns identities, where permissions are granted, how people leave or change teams, how automation authenticates, how emergency administration works, and how policy survives upgrades.
Prefer a small number of explicit trust boundaries. Avoid global grants that compensate for unclear ownership, and avoid extra authorization plugins unless their policy model solves a real requirement.
2. Internal users versus external identity
| Choice | Strengths | Risks / cost | Good fit |
|---|---|---|---|
| Jenkins internal user database | Simple, local, no external dependency. | Manual lifecycle; controller becomes identity store. | Training, isolated/small controllers, bootstrap. |
| External LDAP/AD/OIDC/SAML realm | Central lifecycle, groups, enterprise authentication policy. | Plugin/provider dependency, outage coupling, mapping complexity. | Shared organizational Jenkins with mature identity operations. |
Authentication and authorization remain orthogonal. An external realm can authenticate users while Matrix Authorization decides permissions. Never assume a realm change preserves the meaning of old group names.
3. Matrix versus role-oriented authorization
Matrix Authorization is direct: principals/groups are rows and permissions are columns, globally or on items. It is explicit but can become large. Role-oriented plugins can introduce reusable roles and resource patterns, but they add a plugin-specific policy language, lifecycle, and migration concern.
| Question | Matrix | Role-oriented plugin |
|---|---|---|
| Policy model | Direct principal/group → permission. | Role → permissions + resource matcher + assignment. |
| Folder scoping | Project matrix + inheritance modes. | Usually pattern/resource rules; plugin-specific. |
| Review burden | Rows, grants, inheritance. | Role definitions, patterns, assignments. |
| Dependency | matrix-auth. |
Another authorization plugin and its security/upgrade lifecycle. |
| Failure mode | Broad parent grant / mistaken row. | Over-broad role pattern or assignment. |
4. Global versus folder-scoped rights
Global grants have the widest blast radius and should represent capabilities genuinely needed everywhere. Folder-scoped grants work well when folders correspond to stable ownership. In project-based matrix authorization, permissions are inherited by default from global and parent entities, so a child matrix does not automatically subtract a broad parent grant.
Use stable paths such as teams/payments and
teams/search, not transient personal folders, when
policy depends on hierarchy. Record full item names because moving
items changes context.
5. Why Job/Configure deserves special treatment
Job/Configure is not merely “edit metadata.” It can
influence SCM checkout, build steps, Pipeline definition,
parameters, triggers, agent selection, and integration settings.
Jenkins’ controller-isolation guidance treats people who can
configure build code as part of the execution trust model.
If users can configure jobs, keep built-in-node executors at zero, use reviewed agent boundaries, constrain credentials, and understand what executable configuration they can change.
6. Human administrators versus service identities
| Identity | Typical need | Avoid |
|---|---|---|
| Human admin | Security/plugin/controller configuration and emergency recovery. | Shared passwords; routine builds under full admin. |
| Developer | Read/build; sometimes constrained Configure on owned items. | Overall/Administer and global credentials management. |
| Auditor | Read selected jobs/builds/config metadata. | Build/configure just to simplify UI. |
| Service identity | Specific API trigger or integration. | Shared human login, broad global rights, ownerless token. |
Human administrators should be individually attributable. Automation identities need their own owner, scope, rotation, and audit trail.
7. Credentials are a separate design axis
Do not use folder permissions as a substitute for credential design. Ask separately: who can manage credentials, which jobs can reference them, who can modify those jobs, and on which agents the credentials can be exposed during execution.
Credential-management authority and job-trigger authority are different risks. Keep both narrow.
8. Worked design: four teams, one controller
| Requirement | Decision | Why |
|---|---|---|
| Central employee lifecycle | External enterprise realm (simulated here). | Offboarding/group membership belong to central identity operations. |
| Team isolation | Top-level folders per team + project matrix. | Scope is explicit and reviewable. |
| Routine developers | Overall/Read + Job/Read/Build in owned folder. | Enough to observe and run without changing code. |
| Pipeline maintainers | Additional Job/Configure only in reviewed folder. | Configuration authority is powerful. |
| Controller admins | Small named group with Overall/Administer. | Accountability and smaller blast radius. |
| Automation | Dedicated service identity with exact API need. | Separate lifecycle and rotation. |
9. Change control and rollback
Authorization changes are controller configuration. Capture current state, preserve a tested recovery administrator, take an appropriate backup/snapshot, make one narrow change, and verify under multiple identities. When policy later moves to JCasC, source-of-truth becomes versioned configuration rather than ad hoc UI changes; Chapter 26 covers that architecture.
Jenkins documents an emergency access-control reset, but that intentionally removes protection and belongs only in isolated recovery—not normal administration.
10. Summary
The target is a comprehensible trust model: accountable identities, explicit inheritance, stable ownership folders, tightly controlled Configure authority, separate credential governance, narrow service identities, and a tested recovery path.
Knowledge check
Can an external realm be combined with Matrix Authorization?
Yes. Authentication and authorization are separate axes.
Why is a broad global Build grant hard to undo in a child folder?
Project-based matrix grants are commonly inherited/additive unless inheritance is intentionally changed.
Why not reuse a human admin account for automation?
Automation needs separate ownership, rotation, least privilege, and audit identity.
What extra control matters when granting Job/Configure?
Controller/agent isolation, reviewed executable configuration, and credential boundaries.
Official references and version notes
- Jenkins Access Control — authentication via a security realm and authorization via an authorization strategy are separate decisions.
- Jenkins Permissions — current definitions for Overall, Job, Run, View, Credentials, and Pipeline-related permissions.
- Managing Security — realms, authorization modes, matrix security, and controller-wide security settings.
- Matrix Authorization Strategy Plugin — global/project matrices, inheritance modes, and item-configuration caveats.
- Folders Plugin — folder-based item organization used by the scoped-access examples.
- Jenkins Credentials security guidance — credential scope and access minimization.
- Controller Isolation — why users who influence build code must not run routine builds on the built-in node.
Rechecked against Jenkins primary documentation on
2026-09-15. The disposable examples assume
Jenkins 2.568.3 LTS on Java 21,
matrix-auth:3.3,
cloudbees-folder:6.1106.v3a_d9a_6d2465e, and
credentials:1511.v2e3cb_0008ef0. These plugin
releases declare minimum Jenkins baselines below 2.568.3. Future
readers must re-check plugin health, advisories, dependencies, and
minimum core requirements before installation or upgrade.
Keep the academy open
Support free, practical DevOps education.
Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0Send only Ethereum/ERC-20 compatible assets to this
address.