Active directory 如何使用LDAP 2.0插件为SonarQube 5.6.3配置Active Directory?
我正在努力为Active Directory配置5.6.3 LTS。我阅读了所有的插件文档,并为我们的环境获得了以下内容:Active directory 如何使用LDAP 2.0插件为SonarQube 5.6.3配置Active Directory?,active-directory,ldap,sonarqube,Active Directory,Ldap,Sonarqube,我正在努力为Active Directory配置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,
# 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
当我开始学习时,我会:
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
我尝试过稍微调整一下配置,但没有成功。任何熟悉这一点的人都会注意到什么?基本问题是LDAP端口错误:
ldap.url=ldap://ad1.prod:1389
应该是
ldap.url=ldap://ad1.prod:389
我从不质疑1389端口,即使它不是默认的LDAP端口,因为我是从另一个工作应用程序复制/粘贴的。我想我在这个过程中发现了什么
此外,这:
ldap.user.request=(&(objectClass=inetOrgPerson)(uid={login}))
必须是这样的:
ldap.user.request=(sAMAccountName={0})
实际启用搜索广告。这是一个具体实现。更高效的广告搜索应该是:
ldap.user.request=(&(objectClass=user)(sAMAccountName={login}))
如果您使用的是Active Directory服务器,则可能需要查看中Active Directory服务器的
示例(尤其是对于ldap.user.request
)。除此之外,您可以首先使用专用工具(如ldapsearch
)验证所有这些参数。然后用您尝试过的内容、结果和调试日志更新您的问题。在您提供的LDAP插件文档链接中没有Active Directory的示例(与我使用的文档相同)。我不是LDAP的人,我们所有的广告人都在接受培训。我希望至少有人能告诉我我发布的配置是否有基本意义。我认为这些文档还有很多需要改进的地方,而配置LDAP/AD的UI则更可取。我为此打开了一个增强请求。@Nicolas-是的。Active Directory示例-您指的是屏幕右侧的列。我以为你在谈论某个章节或主题。我的错。你能告诉我这个配置应该放在哪里吗?这是更好的答案。