LDAP configuration for Gerrit?

10.4k views Asked by At

Since google has stopped the openID support for gerrit, i am trying to use LDAP for the same now. I have IP and port number of the LDAP server. But i don't know how to start now.

I also need help to update my etc/gerrit_config file:

[auth]
     type = ldap

[ldap]    
     server = ldap://[IP]
     accountBase = ou=people,dc=domain,dc=com
     groupBase = ou=groups,dc=domain,dc=com 
     referral = follow
     accountPattern = (uid=${username})
     groupPattern = (cn=${groupname})
     accountFullName = cn
     accountMemberField = memberOf
     accountEmailAddress = mail

Since i am a newbie for ldap, could someone please help me in the same.

Thanks!!

1

There are 1 answers

2
Jan On BEST ANSWER

At work I am running a gerrit instance that uses one of our work LDAPs for authentication. I use a configuration like this:

[ldap]
        server = ldap://xxx.OurDomain.com
        username = CN=ldapread,DC=OurDomain,DC=com
        password = NotShownHere
        accountBase = DC=OurDomain,DC=com
        groupBase = DC=OurDomain,DC=com

The key point is that you need an LDAP user that is permitted to read from the LDAP and put the coordinates of that user into the config.

In our case, I obtained these coordinates from a know to work Apache httpd config file. In your case, you may have to ask your LDAP admin for suitable credentials.