Bind to LDAP using only the end-user identity

When auth.type = LDAP_BIND the actual username and password supplied
by the end user is used to connect to the LDAP server to query
for account information.  This permits Gerrit to be connected to
secured directory servers, without requiring a generic user account
for Gerrit itself.

To avoid breaking existing installations that rely upon the account
query to determine the DN for the authentication bind this new mode
uses the new LDAP_BIND auth type setting.

Bug: issue 423
Change-id: I8ec3adc36ae3f2363d344521d02755a2b385db0b
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2010-02-17 17:00:50 -08:00
parent c99630a25d
commit c892d34e34
12 changed files with 48 additions and 5 deletions

View File

@@ -57,6 +57,7 @@ class InitAuth implements InitStep {
switch (auth_type) {
case LDAP:
case LDAP_BIND:
case HTTP_LDAP: {
String server =
ldap.string("LDAP server", "server", "ldap://localhost");