Chapter 04Lesson 01~90 minutes

Users, Authentication Realms, Authorization Strategies, Matrix Permissions, Folders, and Least Privilege: Concepts, Architecture, and Mental Model

Understand Jenkins access control by separating authentication, authorization, matrix permissions, folder inheritance, credentials authority, and administrative power.

Access controlAuthenticationAuthorizationMatrix permissionsLeast privilege

Learning objectives

  • Explain why successful login proves identity but not permission to configure, build, administer, or manage credentials.
  • Trace access decisions through security realm → principal/groups → authorization strategy → object scope → permission check → evidence.
  • Distinguish global, folder, item, build, and credentials permissions without treating UI visibility as proof of authorization.
  • Recognize why Overall/Administer, Job/Configure, anonymous grants, and built-in-node execution are high-impact trust decisions.
  • Use read-only inspection and denial evidence before changing a realm or permission matrix.

1. The problem: “can log in” is not an access-control design

Jenkins answers two different questions for every protected action. First: who is this request? Second: is that identity allowed to perform this action on this object? Authentication answers the first. Authorization answers the second. Mixing them produces unsafe conclusions such as “developers are authenticated, so they can build” or “the job is hidden, so its credentials are safe.”

A controller also has hierarchy. A permission may be global, inherited from a folder, granted on one job, or tied to a different resource type such as credentials. The operational question is therefore not “what role does Alice have?” but “which principal, through which groups, under which authorization strategy, has which permission on which object?”

Chapter 04 rule: authentication success, object visibility, permission to configure a job, permission to trigger a build, permission to administer Jenkins, and permission to manage credentials are distinct states. Prove each separately.

2. The causal access-control model

A security realm authenticates the request and may provide group memberships. Jenkins then asks the configured authorization strategy whether that principal has the required permission on the target object.

Access decision — identity and permission are separate gates
flowchart TD
 A[Request: user or API client] --> B[Security realm]
 B --> C[Authenticated principal + groups]
 C --> D[Authorization strategy]
 D --> E[Global / folder / item / credential scope]
 E --> F[Permission check]
 F -->|allowed| G[Action executes]
 F -->|denied| H[403 / hidden action / denial evidence]
 G --> I[Audit, job, build, or configuration evidence]

A principal can authenticate successfully and still receive an authorization denial. A user can have Overall/Read and Job/Read yet still lack Job/Build. An administrator with Overall/Administer, by contrast, has extremely broad controller authority.

3. Core nouns before configuration

Term Mental model Evidence
Security realm Authentication source: Jenkins internal user database or an external identity plugin. Configured realm, username, groups; never passwords or tokens.
Principal The authenticated user or service identity. Username/service ID attached to the request or build cause.
Authorization strategy Maps principals/groups to permissions. Configured strategy and implementing plugin/version.
Permission A protected capability such as Job/Read or Job/Build. Allowed server action or explicit denial.
Scope The object on which permission is checked. Controller, folder/job full name, build, credential store, view, agent.
Inheritance How global/parent grants flow to children. Matrix inheritance mode plus effective behavior.
anonymous Special principal for unauthenticated requests. Incognito/unauthenticated test.
authenticated Special group for every logged-in user. Broad grant applies to current and future authenticated accounts.

4. Permission families and blast radius

Overall/Read is a prerequisite for most meaningful Jenkins access. Overall/Administer is the highest-power permission and exposes sensitive administration including plugin management and Script Console. It is not a routine developer role.

Job permissions answer different questions. Job/Read permits seeing an item. Job/Build permits scheduling it. Job/Configure permits changing item configuration and is much more powerful because it can change what code executes, where, and with which integrations.

When the Credentials Plugin is installed, Credentials/Create, Credentials/Update, Credentials/Delete, Credentials/View, and Credentials/ManageDomains are separate management permissions. Folder visibility is not evidence that a user should manage a credential store.

Permission What it proves What it does not prove
Overall/Read Basic authenticated access. No build/configure/admin/credentials authority.
Job/Read Read the relevant item. No right to trigger or modify it.
Job/Build Schedule a build if prerequisite visibility exists. No right to change executable configuration.
Job/Configure Modify item configuration. Not harmless merely because Overall/Administer is absent.
Overall/Administer Near-total controller authority. Not appropriate as convenience access.
Credentials permissions Specific credential-store management operations. No automatic entitlement from job visibility.

5. Matrix Authorization and folder inheritance

Matrix Authorization Strategy provides a global matrix and project-based matrix authorization. In project-based mode, global and parent-folder permissions are inherited by default. The plugin also offers modes to inherit only global configuration or to stop ordinary parent inheritance. Overall/Administer remains special: child ACLs cannot exclude Jenkins administrators.

Important: clearing a child checkbox does not necessarily remove an inherited permission. Diagnose the effective union of global, parent, group, and direct grants.

The plugin also warns that users allowed to configure project-based items can grant themselves other permissions on those items. Treat Job/Configure as a trust boundary, not a cosmetic editor permission.

6. Inspect before changing security

Before changing a realm or matrix, capture the Jenkins/Java/plugin baseline, current security realm, current authorization strategy, a tested administrative recovery identity, and the full item paths you intend to scope. Keep secrets out of the evidence.

docker exec jenkins-ch04 java -version
curl -fsSI http://127.0.0.1:8080/login | grep -i '^X-Jenkins:'
# Then inspect Manage Jenkins → Security as the disposable administrator.

The HTTP header helps prove controller identity; it does not prove access-control configuration. Inspect the realm and strategy in Jenkins itself without copying password hashes, API tokens, credential values, or controller secret keys.

7. Access control does not replace execution isolation

Users with Job/Configure can influence build code. Jenkins therefore recommends not running routine builds on the built-in node. A strong permission matrix combined with controller execution would still leave build code inside the controller filesystem trust boundary.

Identity evidence

Realm, principal, relevant groups.

Authorization evidence

Strategy, scope, grants, inheritance.

Execution evidence

Job/build, node/agent, workspace.

Credential evidence

Scope/ID metadata only, never secret values.

8. Misconceptions to remove now

  • “Authenticated means trusted.” Authentication establishes identity, not permission level.
  • “Hidden UI means secure.” Server-side authorization is the boundary.
  • “Folder visibility equals credential access.” These are separate permission/scope systems.
  • “Removing Administer makes Configure harmless.” Configure can change executable behavior.
  • “Project matrices subtract parent grants.” They are commonly inherited/additive unless configured otherwise.

9. Summary

A defensible Jenkins permission model starts with a known identity source, then applies explicit permissions at explicit scopes. Administration stays rare, Configure is treated as code-execution authority, credentials are governed separately, and every important policy claim is proven with both allowed and denied behavior.

Next lesson

Build the matrix on a disposable controller

Create synthetic identities, scope jobs under folders, and prove both allowed and denied actions without exposing real credentials.

Knowledge check

A user signs in but gets HTTP 403 when starting a job. Which layer should you inspect first?

Why is Overall/Administer inappropriate for routine developers?

You remove Build from a child job, but the user can still build. What next?

Does seeing a folder prove a user may manage its credentials?

Official references and version notes

Version and compatibility note

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.

Ethereum / ERC-20
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0Send only Ethereum/ERC-20 compatible assets to this address.