Jenkins Jenkins Security 1 — Questions and Answers
Question 1: Where is Jenkins security configuration managed?
- Manage Jenkins > Manage Users
- Manage Jenkins > Configure Global Security (Correct answer)
- Manage Jenkins > Security Matrix
- System > Security Settings
Correct answer: Manage Jenkins > Configure Global Security
The Configure Global Security page is where you enable security, set the security realm, and configure authorization strategy.
Question 2: Which security realm allows Jenkins to use its own user database for authentication?
- LDAP
- Jenkins' own user database (Correct answer)
- Unix user/group database
- Active Directory
Correct answer: Jenkins' own user database
The 'Jenkins' own user database' realm stores users in Jenkins' internal database, managed via the Manage Users page.
Question 3: What is the Matrix-based security authorization strategy in Jenkins?
- A plugin that adds two-factor authentication
- A permission model that assigns specific permissions to individual users or groups in a table (Correct answer)
- A network firewall matrix for Jenkins ports
- An automated security scanning feature
Correct answer: A permission model that assigns specific permissions to individual users or groups in a table
Matrix-based security presents a permission grid where admins can grant specific permissions (like build, configure, view) to each user or group.
Question 4: What does enabling 'Prevent Cross Site Request Forgery exploits' do in Jenkins?
- Blocks external webhooks
- Adds a CSRF protection token (crumb) required on all state-changing HTTP requests (Correct answer)
- Encrypts all form submissions
- Requires HTTPS for all connections
Correct answer: Adds a CSRF protection token (crumb) required on all state-changing HTTP requests
CSRF protection in Jenkins requires a 'crumb' token with every mutating HTTP request, preventing cross-site request forgery attacks.
Question 5: Which Jenkins credential type is used to store a username and password pair?
- Secret text
- SSH Username with private key
- Username with password (Correct answer)
- Certificate
Correct answer: Username with password
The 'Username with password' credential type stores a username/password pair and can be bound in pipelines using `withCredentials`.
Question 6: What is the scope difference between 'Global' and 'System' credentials in Jenkins?
- Global credentials are encrypted; System credentials are plaintext
- Global credentials are accessible from any job; System credentials are only accessible to Jenkins internals and plugins (Correct answer)
- System credentials apply to all users; Global credentials apply to admins only
- There is no functional difference
Correct answer: Global credentials are accessible from any job; System credentials are only accessible to Jenkins internals and plugins
System-scoped credentials are only available to Jenkins core and plugins (e.g., for agent connections), while Global credentials are accessible to jobs and pipelines.
Where is Jenkins security configuration managed?