I try to setup Gerrit with openldap authentication. Here's my config:
[auth]
type = LDAP
gitBasicAuthPolicy = HTTP
userNameCaseInsensitive = true
[ldap]
server = ldap://ldap_server_ip
username = cn=admin,dc=company,dc=com
accountBase = dc=company,dc=com
groupBase = dc=company,dc=com
ldap password store in secure.config file.
When trying login with my ldap credential, I received the error:
[2023-11-29T18:35:09.376-08:00] [HTTP POST /login/%2F (N/A from [0:0:0:0:0:0:0:1])] ERROR com.google.gerrit.auth.ldap.LdapRealm : Cannot query LDAP to authenticate user
javax.naming.AuthenticationNotSupportedException: [LDAP: error code 48 - anonymous bind disallowed]
The ldap server is working with other client, and that account is permitted to read for sure.
Please guide me to figure out which part of my configuration went wrong. Thank you.
Figured out the correct configuration. Although document says:
It seems gerrit will still make an anonymous connection attemp. To completely turn off anonymous connection require following configuration: