【问题标题】:Integrating sonarqube with Ldap将 sonarqube 与 Ldap 集成
【发布时间】:2017-08-04 05:42:18
【问题描述】:

我用谷歌搜索了很多,但我找不到如何将 LDAP 与 sonarqube 集成的答案。大部分文件都显示我们需要在 /sonarqube-6.2/conf/sonar.properties 中修改如下;

# LDAP configuration 
# General Configuration 
sonar.security.realm=LDAP 
ldap.url=ldap://myserver.mycompany.com 
ldap.bindDn=my_bind_dn 
ldap.bindPassword=my_bind_password 

# User Configuration 
ldap.user.baseDn=ou=Users,dc=mycompany,dc=com 
ldap.user.request=(&(objectClass=inetOrgPerson)(uid={login})‌​)
ldap.user.realNameAttribute=cn ldap.user.emailAttribute=mail 

# Group Configuration 
ldap.group.baseDn=ou=Groups,dc=sonarsource,dc=com 
ldap.group.request=(&(objectClass=posixGroup)(memberUid={uid‌​}))

但问题是我可以在 sonar.properties 中找到任何具有 LDAP 集成的块。我需要手动添加这些行还是已经存在?我也尝试过使用插件,但安装后找不到使用插件的后续步骤。

【问题讨论】:

  • # LDAP 配置 # 常规配置 sonar.security.realm=LDAP ldap.url=ldap://myserver.mycompany.com ldap.bindDn=my_bind_dn ldap.bindPassword=my_bind_password # 用户配置 ldap.user .baseDn=ou=Users,dc=mycompany,dc=com ldap.user.request=(&(objectClass=inetOrgPerson)(uid={login})) ldap.user.realNameAttribute=cn ldap.user.emailAttribute=mail #组配置 ldap.group.baseDn=ou=Groups,dc=sonarsource,dc=com ldap.group.request=(&(objectClass=posixGroup)(memberUid={uid}))
  • 那些 LDAP 详细信息应该在问题正文中而不是 cmets 中!请edit您的问题并将其添加到那里,因此配置实际上是可读的,并且与其余配置一样。

标签: ldap continuous-integration sonarqube integration devops


【解决方案1】:

与 LDAP 相关的属性不在 SonarQube 内置 sonar.properties 配置文件中,因为开箱即用的 SonarQube 没有 LDAP 功能。

请记住,SonarQube 具有基于插件的架构。 LDAP Plugin 附带 LDAP 功能。该文档页面详细介绍了各种配置属性以及一些示例。

【讨论】:

  • 感谢您的回复@Nicolas。但问题是我需要自己在 sonar.properties 中添加这段代码吗? sonar.security.realm=LDAP ldap.url=ldap://myserver.mycompany.com ldap.bindDn=my_bind_dn ldap.bindPassword=my_bind_password # User Configuration ldap.user.baseDn=ou=Users,dc=mycompany,dc=com ldap.user.request=(&(objectClass=inetOrgPerson)(uid={login})) ldap.user.realNameAttribute=cn ldap.user.emailAttribute=mail # Group Configuration ldap.group.baseDn=ou=Groups,dc=sonarsource,dc=com ldap.group.request=(&(objectClass=posixGroup)(memberUid={uid}))
  • 是的,必须在 sonar.properties 中设置 LDAP 插件配置。实际属性值取决于您的 LDAP 部署。
  • 谢谢@Nicolas
  • 你能再解释一下吗。因为我是初学者。我需要将上述 LDAP 配置粘贴到 sonar.properties 中,对吗?那我安装的 sonar LDAP 插件有什么用
猜你喜欢
  • 2017-08-06
  • 2016-10-22
  • 2020-12-13
  • 2015-08-10
  • 2019-01-23
  • 2019-02-16
  • 2022-07-15
  • 2015-10-13
  • 1970-01-01
相关资源
最近更新 更多