Skip to content

Instantly share code, notes, and snippets.

@pcholakov
Created October 30, 2014 11:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pcholakov/01dce069b2576c24fb1d to your computer and use it in GitHub Desktop.
Save pcholakov/01dce069b2576c24fb1d to your computer and use it in GitHub Desktop.
Gerrit ActiveDirectory LDAP_BIND authentication example
# To log in, use "user@example.com" and NT password in the Gerrit login form. To confirm the pattern for your directory, test with:
# ldapsearch -h adldap -s sub -s sub -b 'dc=example,dc=com' "(&(objectClass=person)(userPrincipalName=user@example.com))"
[auth]
type = LDAP_BIND
[ldap]
server = ldap://adldap
accountBase = DC=example,DC=com
accountPattern = (&(objectClass=person)(userPrincipalName=${username}))
#accountPattern = (&(objectClass=person)(sAMAccountName=${username}))
accountScope = sub
groupBase = DC=example,DC=com
accountFullName = displayName
accountMemberField = memberOf
accountEmailAddress = mail
accountSshUserName = ${sAMAccountName.toLowerCase}
referral = follow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment