Checkpoint Lab — SSO, LDAP, OIDC/SAML Plugins, External Identity, RBAC Patterns, and Enterprise Access Governance
Design and prove a three-group enterprise-access model, deprovision one user, then recover from a simulated IdP outage without anonymous access or a permanent admin bypass.
Learning objectives
- Predict and verify identity, authorization and recovery state transitions.
- Prove least privilege with positive and negative tests for three groups.
- Prove user deprovisioning with fresh-session and Jenkins-token checks.
- Rehearse provider outage recovery without weakening anonymous/authorization controls.
- Produce a durable evidence packet linking plugin versions, mappings, users, tests and recovery notes.
1. Scenario
You operate a disposable controller named
jenkins-lab-30. Three enterprise groups must be
represented:
| Group | Members at start | Required access |
|---|---|---|
| jnk-viewers | alice | Read Jenkins and identity-lab jobs; no build/configure |
| jnk-builders | bob | Viewer + build identity-lab/team-a/smoke; no configure/admin |
| jnk-platform-admins | carol | Administer this disposable lab only |
You will then remove Bob from jnk-builders, prove the
build right disappears, simulate the identity provider becoming
unavailable, recover through the offline break-glass configuration,
and finally restore the external/simulated realm.
2. Recorded lab assumptions
Date: 2026-09-17
Jenkins: 2.568.3 LTS
Java: 21
Mock Security Realm: 134.v31b_1cc496b_43 (LAB ONLY)
Matrix Authorization Strategy: 3.3
Optional comparison plugins:
LDAP: 825.v2fca_37dd5b_cb_
OIDC: 4.718.ve731df6ca_88a_
SAML: 4.623.v7875d61cd9f5
Role Strategy: 898.vc050ed2424ca_
Built-in executors: 0
Target folder: identity-lab/team-a
Target job: identity-lab/team-a/smoke
Anonymous permissions: none
3. Prediction gate — write these down before execution
- After enabling the synthetic external-style realm and authorization mapping, Alice will read but not build; Bob will build but not configure; Carol will administer the disposable controller.
-
After Bob loses
jnk-buildersand starts a fresh session, the same job build action will be denied while viewer access remains. - During the simulated IdP outage, new external authentication will fail but anonymous access will remain disabled.
- Applying the offline recovery configuration will change the security realm/controller configuration state, not job build history or artifact state; the temporary recovery admin will regain controlled administration.
4. Setup and preflight
Use a disposable controller or clone. Create
identity-lab/team-a/smoke as a harmless
Pipeline/Freestyle job that only emits synthetic text on a
non-controller agent. Capture controller/core/Java/plugin inventory
and a configuration snapshot before the realm change.
pipeline {
agent { label 'ch30-lab' }
stages {
stage('Smoke') {
steps {
echo 'synthetic identity-governance lab only'
}
}
}
}
If you do not have a separate agent, keep the job defined but do not enable a controller executor merely to run it. Authorization tests can still verify Job/Build permission without violating controller-isolation policy.
5. Execute the three-group mapping
Configure the synthetic realm identities, then map the three groups with Matrix Authorization. Keep the mapping minimal and explicit. Capture the authorization table before testing.
| Persona | Read | Build smoke | Configure smoke | Overall/Administer |
|---|---|---|---|---|
| alice / viewers | ALLOW | DENY | DENY | DENY |
| bob / builders | ALLOW | ALLOW | DENY | DENY |
| carol / platform-admins | ALLOW | ALLOW | ALLOW | ALLOW — disposable lab only |
| dave / no group | DENY according to baseline | DENY | DENY | DENY |
6. Verify independently
For each user, start a fresh session and test the exact actions above. Record HTTP/UI result and, for Bob’s allowed build, capture job full name, build number, build cause/user identity, queue item if visible, agent label/workspace, source/Jenkinsfile revision if SCM-backed, and console log.
At least one negative test must produce an explicit permission denial. A checkpoint with only successful tests does not prove least privilege.
7. Deprovision Bob
Remove Bob from jnk-builders in the simulated external
source. Preserve the “before” membership record. Then:
- End the old browser session or otherwise use a clean session according to the realm contract.
- Authenticate Bob again.
-
Prove Bob can still read if he remains in
jnk-viewers. -
Prove
Job/Buildis now denied foridentity-lab/team-a/smoke. - If Bob has a Jenkins API token in the lab, revoke it and capture only token metadata/revocation evidence—never its value.
8. IdP outage drill
Trigger the Mock Security Realm outage simulation or use a configuration-only equivalent. Verify that an unauthenticated request does not gain anonymous access. Preserve the login failure and provider/realm evidence.
Then follow the offline recovery procedure: use trusted controller configuration access to apply the prebuilt local-realm recovery configuration, authenticate as the temporary recovery administrator, inspect the controller, and record the exact realm change. Do not alter job source, build history, artifacts or agent trust just to prove access.
After the simulated provider recovers, restore the external-style realm configuration, verify Carol can administer again, verify Alice/Bob policies, and rotate/remove the temporary recovery credential.
9. Required evidence packet
| Evidence file/record | Minimum content |
|---|---|
| baseline.txt | Controller URL/identity, Jenkins/Java, plugin versions, built-in executors, anonymous policy |
| identity-map.md | Synthetic users/groups, realm/plugin, claim/group naming contract |
| authorization-map.md | Group→permission/role mapping including folder/item scope |
| positive-negative-tests.md | Alice/Bob/Carol/Dave allow+deny observations from fresh sessions |
| build-evidence.txt | Exact Bob build full name/number/cause/agent/workspace if executed |
| deprovision.txt | Before/after Bob memberships, fresh-session denial, API-token action if applicable |
| outage-recovery.txt | Outage evidence, anonymous still denied, recovery realm activation, restoration, credential rotation |
| assumptions.md | Provider-specific limitations, session/token caveats, lab-only Mock Realm warning |
10. Verification checklist
- Authentication and authorization results are recorded separately.
- No broad group receives
Overall/Administer. - Anonymous access remains disabled throughout the outage drill.
- Built-in node remains at zero executors.
- No real client secret, LDAP password, SAML key, API token or enterprise identifier is stored in the lab evidence.
- Bob’s removed group actually changes observed Jenkins capability after a fresh session.
- Break-glass recovery is normally inactive, audited, reversible and followed by credential rotation.
- Realm/plugin/core versions are documented so the exercise is reproducible.
11. Cleanup and rollback
- Restore the controller to the pre-lab configuration or delete the disposable controller.
- Remove Mock Security Realm from any environment that is not explicitly a disposable test instance.
- Delete synthetic users/tokens and temporary recovery credentials.
- Retain only sanitized evidence and configuration diffs—never secret material.
- If an optional external IdP simulator was used, delete its lab application/client and fake users.
12. What Chapter 30 adds to the production Jenkins model
You now have an identity-control model that distinguishes realm authentication from Jenkins authorization, treats external groups as policy inputs rather than privileges, handles browser sessions and Jenkins API tokens as separate lifecycle state, and includes a tested IdP-outage recovery path. Chapter 31 builds on this governance model to protect the software supply chain itself: SBOMs, signatures, provenance, trusted agents and dependency controls.
Knowledge check
Answer before revealing the explanation.
1. What are the two most important state changes to predict before the checkpoint?
The group→permission behavior after realm/mapping activation, and the loss of Bob’s build capability after deprovisioning/fresh-session verification; the outage recovery realm change is another key prediction.
2. Why must the checkpoint include denial tests?
Successful login/build tests only prove allowed paths. Least privilege requires evidence that viewers/builders cannot cross into configuration/admin capabilities.
3. During the IdP outage drill, what must remain true?
Anonymous access and authorization protections remain intact; recovery uses the controlled break-glass configuration rather than bypassing security.
4. What should happen to the temporary recovery credential after service is restored?
Rotate/remove it according to the recovery runbook and record that cleanup; break-glass credentials should not become routine permanent access.
5. What is the conceptual bridge from this chapter to supply-chain security?
Chapter 30 proves who may perform Jenkins actions; Chapter 31 proves the integrity, provenance and dependency controls of the software those authorized actions produce.
Official references and version notes
- Jenkins LTS changelog — chapter baseline: Jenkins 2.568.3 LTS; labs use Java 21.
- Securing Jenkins — security realm versus authorization strategy, least privilege, controller isolation and access-control fundamentals.
- LDAP plugin — version 825.v2fca_37dd5b_cb_ (requires Jenkins 2.504.3); current release includes fixes beyond earlier LDAP referral/SSRF advisories.
- OpenID Connect Authentication plugin — version 4.718.ve731df6ca_88a_ (requires Jenkins 2.539); issuer/audience/group-claim behavior is provider configuration, not Jenkins authorization by itself.
- SAML plugin — version 4.623.v7875d61cd9f5 (requires Jenkins 2.504.3).
- Matrix Authorization Strategy — version 3.3 (requires Jenkins 2.528.3); supports granular global/project authorization.
- Role-based Authorization Strategy — version 898.vc050ed2424ca_ (requires Jenkins 2.559); supports global/item/agent roles and group assignments.
- Mock Security Realm — version 134.v31b_1cc496b_43; intentionally insecure and suitable only for disposable testing/demonstration.
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.