How do you harden a Jenkins controller?
AdvancedProductionJenkins in Production
Answer
- SSO (SAML/OIDC) plus role-based authorization; no anonymous read.
- Zero executors on the controller; agents-to-controller access control enabled.
- TLS at the ingress, and not exposed publicly unless needed.
- CSRF protection on; API tokens instead of passwords.
- Minimal plugins, patched quickly.
- Script Security: restrict approvals; only admins edit global libraries.
- Credentials folder-scoped, with secrets in an external vault where possible.
- Audit Trail plugin, log shipping, and regular review of users and tokens.
- Disable the script console for non-admins and monitor use of it.
More on Jenkins in Production
How do you run Jenkins for high availability and scale?AdvancedHow do you tune the Jenkins controller JVM and avoid out-of-memory crashes?AdvancedHow do you back up and restore Jenkins?IntermediateHow do you upgrade Jenkins and its plugins safely?IntermediateHow do you configure dynamic Kubernetes agents in Jenkins for production use?IntermediateWhat are the pitfalls of Docker socket mounting in Jenkins agents, and what are alternatives?Advanced