Gerrit 显示 LDAP:错误代码 48 - 不允许匿名绑定

问题描述 投票:0回答:1

我尝试使用 openldap 身份验证设置 Gerrit。这是我的配置:

[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 密码存储在

secure.config
文件中。

尝试使用我的 LDAP 凭据登录时,我收到错误:

[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]

LDAP 服务器正在与其他客户端一起工作,并且该帐户肯定被允许读取。
请指导我找出我的配置的哪一部分出了问题。谢谢你。

ldap gerrit openldap
1个回答
0
投票

找出正确的配置。尽管文件说:

ldap.username
(Optional) Username to bind to the LDAP server with. If not set,
an anonymous connection to the LDAP server is attempted.

看来 gerrit 仍会尝试进行匿名连接。要完全关闭匿名连接需要以下配置:

ldap.supportAnonymous = false
© www.soinside.com 2019 - 2024. All rights reserved.