我试图在活动目录服务器上安装带有ldap身份验证的sonarqube7.7,但我无法让它工作。我从运行在同一主机上的另一台服务器复制了设置,它的ldap设置可以工作。
这是我目前在声呐中的配置:
ldap.url=ldap://myADserver.mydomain.local:389
ldap.bindDn="CN=myldapuser,OU=Users,DC=mydomain,DC=local"
# ldap.bindPassword=mypassword
ldap.authentication=simple
ldap.realm=mydomain.local
ldap.user.baseDn="OU=myadgroup,DC=mydomain,DC=local"
ldap.user.request="(&(objectClass=user)(sAMAccountName={login}))"
ldap.user.realNameAttribute=cn如果我提供了密码,web.log中的此错误消息将在启动时关闭声呐库:
Caused by: javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C09042F, comment: AcceptSecurityContext error, data 52e, v2580此消息显然意味着用户是正确的,但密码是不正确的。然而,密码在另一台服务器和ldapsearch中都有效。
如果我像上面那样注释掉密码,sonarqube就会启动,但是无法验证ldap用户。我可以登录到默认的管理用户。
DEBUG web[AWqxWJwHqJPbGHfaAAAX][o.s.p.l.LdapUsersProvider] User mypersonaluser not found in <default>
ERROR web[AWqxWJwHqJPbGHfaAAAX][o.s.s.a.CredentialsExternalAuthentication] Error during authentication
org.sonar.plugins.ldap.LdapException: Unable to retrieve details for user mypersonaluser in <default>
Caused by: javax.naming.directory.InvalidSearchFilterException: invalid attribute description
DEBUG web[AWqxWJwHqJPbGHfaAAAX][auth.event] login failure [cause|Unable to retrieve details for user mypersonaluser in <default>][method|FORM][provider|REALM|LDAP][IP|server_internal_IP|office_pub_IP][login|mypersonaluser]为了完整起见,另一个服务器和ldapsearch的配置如下:
base = "OU=myadgroup,DC=mydomain,DC=local",
bind_dn = "CN=myldapuser,CN=Users,DC=mydomain,DC=local",
host = "myADserver.mydomain.local",
label = "ldap",
method = "plain",
password = "mypassword",
port = 389,
uid = "sAMAccountName"
ldapsearch -D "cn=myldapuser,cn=users,DC=mydomain,DC=local" -p 389 -h myADserver.mydomain.local -b "OU=myadgroup,DC=mydomain,DC=local" "(&(objectClass=user)(sAMAccountName=mypersonaluser))" -u myldapuser -w mypassword我的声纳配置有什么问题,我该如何修复?
发布于 2020-12-23 17:13:16
看起来你的密码字段被注释掉了#?
# ldap.bindPassword=mypassword你也不需要在参数周围"“
除非服务器允许匿名访问LDAP目录,否则需要设置bindBn和bindPassword。
# Bind DN is the username of an LDAP user to connect (or bind) with.
ldap.bindDn=cn=user,OU=ou,DC=mycompany,DC=local
# Bind Password is the password of the user to connect with.
ldap.bindPassword=secrethttps://serverfault.com/questions/967177
复制相似问题