How to create and add users to a group in Jenkins for authentication?

SecurityLdapHudsonOpenidJenkins

Security Problem Overview


I choose to use "Jenkins's own user database" security realm for user login as I couldn't use LDAP in my company. And Google's OpenID has issue when you decided to change the hostname or port number to something else.

And I use "Project-based Matrix Authorization Strategy" schema for my security.

But I don't seem to able to create my own group, and add users to the group to manage the permission.

Security Solutions


Solution 1 - Security

According to this posting by the lead Jenkins developer, Kohsuke Kawaguchi, in 2009, there is no group support for the built-in Jenkins user database. Group support is only usable when integrating Jenkins with LDAP or Active Directory. This appears to be the same in 2012.

However, as Vadim wrote in his answer, you don't need group support for the built-in Jenkins user database, thanks to the Role strategy plug-in.

Solution 2 - Security

You could use Role Strategy plugin for that purpose. It works like a charm, just setup some roles and assign them. Even on project-specific level.

Solution 3 - Security

I installed the Role plugin under Jenkins-3.5, but it does not show the "Manage Roles" option under "Manage Jenkins", and when one follows the security install page from the wiki, all users are locked out instantly. I had to manually shutdown Jenkins on the server, restore the correct configuration settings (/me is happy to do proper backups) and restart Jenkins.

I didn't have high hopes, as that plugin was last updated in 2011

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionxbetaView Question on Stackoverflow
Solution 1 - SecuritySteve HHHView Answer on Stackoverflow
Solution 2 - SecurityVadim KotovView Answer on Stackoverflow
Solution 3 - SecurityTuxView Answer on Stackoverflow