Thursday, August 23, 2018

Ldap configuration for Gerrit

Use below mentioned configuration in LDAP(Active Directory) authentication for Gerrit.

Prerequisite:

  1. You should have your work LDAP for authentication.
  2. You should aware with Gerrit configuration file(gerrit.config) 
1) Open "gerrit.config" file and add below mentioned configuration:
[auth]
        type = LDAP
        gitBasicAuthPolicy = LDAP
[ldap]
        server = ldap://xxx.OurDomain.com/local
        username = CN=test,OU=users,OU=India,OU=Users,DC=OurDomain, DC=com/local
        accountBase = OU=users,OU=India,OU=Users,DC=OurDomain, DC=com/local
        accountPattern = (&(objectClass=user)(sAMAccountName=${username}))
        accountFullName = displayName
        accountEmailAddress = mail
        groupBase = OU=users,OU=India,OU=Users,DC=OurDomain, DC=com/local

2) Save this file and restart your gerrit server.


Tested above mentioned code with Gerrit 2.15.3 version and it was working fine.


No comments:

Post a Comment