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:
@@ -76,6 +76,7 @@ class GerritConfigProvider implements Provider<GerritConfig> {
|
||||
final GerritConfig config = new GerritConfig();
|
||||
switch (authConfig.getAuthType()) {
|
||||
case LDAP:
|
||||
case LDAP_BIND:
|
||||
config.setRegisterUrl(cfg.getString("auth", null, "registerurl"));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -101,6 +101,7 @@ public class WebModule extends FactoryModule {
|
||||
break;
|
||||
|
||||
case LDAP:
|
||||
case LDAP_BIND:
|
||||
install(new LdapAuthModule());
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user