active-directory - 如何使用 LDAP 2.0 插件为 SonarQube 5.6.3 配置 Active Directory?

标签 active-directory ldap sonarqube

我正在努力为 Active Directory 配置 LDAP 2.0 plugin for Sonarqube 5.6.3 LTS。我阅读了所有插件文档,并为我们的环境找到了这个:

# LDAP configuration
# General Configuration
sonar.security.realm=LDAP
sonar.security.savePassword=false
sonar.forceAuthentication=true
ldap.url=ldap://ad1.prod:1389
ldap.bindDn=CN=myUser,OU=Service-Accounts,DC=ad1,DC=prod
ldap.bindPassword=myPassword

# User Configuration
ldap.user.baseDn=DC=ad1,DC=prod
ldap.user.request=(&(objectClass=inetOrgPerson)(uid={login}))
ldap.user.realNameAttribute=displayName
ldap.user.emailAttribute=mail

当我启动 Sonarqube 时,我得到:
INFO  web[org.sonar.INFO] Security realm: LDAP
INFO  web[o.s.p.l.LdapSettingsManager] User mapping: LdapUserMapping{baseDn=DC=ad1,DC=prod, request=(&(objectClass=inetOrgPerson)(uid={0})), realNameAttribute=displayName, emailAttribute=mail}
INFO  web[o.s.p.l.LdapSettingsManager] Groups will not be synchronized, because property 'ldap.group.baseDn' is empty.
INFO  web[o.s.p.l.LdapContextFactory] Test LDAP connection: FAIL
ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
java.lang.IllegalStateException: Unable to open LDAP connection
    at org.sonar.plugins.ldap.LdapContextFactory.testConnection

我试过稍微调整配置,但没有运气。对于更熟悉这一点的人来说,有什么突出之处吗?

最佳答案

更有效的 AD 搜索类似于:

ldap.user.request=(&(objectClass=user)(sAMAccountName={login})) 

关于active-directory - 如何使用 LDAP 2.0 插件为 SonarQube 5.6.3 配置 Active Directory?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40139543/

相关文章:

javascript - 使用 javascript 和 Node 的 Windows AD 单点登录

azure - AAD 发行的 JWT token 中缺少角色声明

c# - 在哪里可以找到完整的属性列表以使用 LDAP 过滤器进行搜索?

java - LDAP 中基于角色的安全实现

sql-server-2005 - 从 sql server 2005 查询 AD

java - 如何使用 JNDI 添加新组到 ApacheDS?

c# - 忽略多个标准不起作用的问题

java - Sonar 显示旧代码中存在新的违规行为

Sharepoint Windows 帐户管理

java - servlet 中的资源注释触发 squid :S2226