This post is part of a series:
- Jenkins.NET
- Jenkins.NET Plugins
- Setup Jenkins.NET
- Setting up your first job
- Your first build
- Breaking the build
- Diagnosing and fixing a broken build
- Monitoring your build
- Running your tests
- Code Analysis
- Security
- Active Directory Security
By default Jenkins is wide open to anyone who stumbles across your web server, depending on your circumstances you may want to enable Jenkins security and force developers and even guests to login.
Configuration
Jenkins security is configured from the main Jenkins configuration page which is accessed via Jenkins » Manage Jenkins » Configure System.
Tick the “Enable security” check box to open up the security area.
Access Control
Under the Access Control - Security Realm section select the “Jenkins’s own user database” radio button.
Un-tick the “Allow users to sign up” check box otherwise anyone hitting the site will be able to sign up for an account (if your enabling security my guess is you don’t want that).
Authorization
Under the Authorization section select the “Matrix-based security” radio button. This option will give you the most flexibility over the security for Jenkins. I usually give Anonymous users Read access that allows me to share the build information with managers and stake holders if they are interested. As I trust my fellow developers I will usually give them Administrator access on the server. Of course you are free to setup whatever security Matrix you like, you can even take this as far as a project-based matrix.
Add Administrator
- Enter your username in the “User/group to add” text box.
- Click the “Add” button.
- Tick the Administer check box in the Overall area of the matrix.
- Finally click the “Save” button.
First user sign up
If this is the first time you’ve setup a user on the server Jenkins will immediately ask for your user credentials.
- Enter your user credentials.
- Click the “Sign up” button.
You should see a success message from Jenkins saying you are now logged in.
Adding Users
You’ll want to add more users to the servers this is done via the Manage Users page. You can access this page via Jenkins » Manage Jenkins » Manage Users.
Create User
Click the Create User link to add another user.
You will now see the Sign up page.
Enter the credentials for the new user. Make sure you remember the username, as you’ll probably want to give the new user more than read only access to the server.
Authorization
After creating the user you’ll want to give them an authorization level. This is done via the main Jenkins configuration page, Jenkins » Manage Jenkins.
- Enter your username in the “User/group to add” text box.
- Click the “Add” button.
- Tick the Administer check box in the Overall area of the matrix.
- Finally click the “Save” button.