我们刚刚在测试环境中对SonarQube 5.6进行了升级。目前的Sonar 5.2在使用LDAP认证的生产环境中工作良好。SonarQube 5.6 LDAP组认证
我可以使用我的AD凭据登录,但当我通过本地管理员帐户查看我的权限时,我没有任何组成员资格。
此外,除了我在Sonar中的原始LDAP帐户外,我现在还有第二个帐户,其语法为[email protected]而不是用户名。 我的用户名帐户仍然具有原始组成员身份,但是新创建的[email protected]没有。
当我尝试在声纳中手动分配组时,它们在下一次登录时被清除,这是我相信的。
我已启用调试日志,这表明它实际上仍然从活动目录中找到memberOf组,但它不会将它们链接到我的帐户。 这些群体仍然存在于声纳。
2016.06.08 11:20:55 DEBUG web[o.s.p.l.w.WindowsUsersProvider] Requesting details for user: nico
2016.06.08 11:20:55 DEBUG web[o.s.p.l.w.WindowsAuthenticationHelper] Getting details for user: nico
2016.06.08 11:20:55 DEBUG web[o.s.p.l.w.AdConnectionHelper] Getting active directory bind string for domain: Domain
2016.06.08 11:20:55 DEBUG web[o.s.p.l.w.AdConnectionHelper] Active directory bind string for the domain Domain: LDAP://Domain/DC=domain,DC=com
2016.06.08 11:20:56 DEBUG web[o.s.p.l.w.WindowsAuthenticationHelper] Details for user nico: UserDetails{name=Nico (nico), [email protected], [email protected]}
2016.06.08 11:20:56 DEBUG web[o.s.p.l.w.WindowsAuthenticationHelper] Authenticating user: nico
2016.06.08 11:21:03 DEBUG web[o.s.p.l.w.WindowsAuthenticationHelper] Getting groups for user: Domain\nico
2016.06.08 11:21:03 DEBUG web[o.s.p.l.w.WindowsAuthenticationHelper] Groups for the user Domain\nico : [Sonar [email protected], Sonar [email protected]]
2016.06.08 11:21:03 DEBUG web[o.s.s.u.NewUserNotifier] User created: [email protected] Notifying NewUserHandler handlers...
我注意到有关日志什么是所使用的用户名属性看起来并不一致。 有一点说:“验证用户:nico”,在另一个“获得Domain \ Nico的组”,最后是“创建用户[email protected]” 3个不同的用户名被使用。
这是我可以/应该控制的东西吗?或者这是SonarQube的问题。
期待您的反馈。
尼科
这是我的LDAP配置
# LDAP configuration
# General Configuration
sonar.security.realm: LDAP
sonar.security.savePassword: true
sonar.authenticator.createUsers: true
sonar.security.localUsers: admin,sonar-build
ldap.url: ldap://ipadress:389
ldap.bindDn: CN=SonarUser,OU=Service Accounts,DC=domain,DC=com
ldap.bindPassword: {aes}xxx
# User Configuration
ldap.user.baseDn: DC=domain,DC=com
ldap.user.request: (&(objectClass=user)(sAMAccountName={login}))
ldap.user.realNameAttribute: cn
ldap.user.emailAttribute: mail
# Group Configuration
ldap.group.baseDn: DC=domain,DC=com
ldap.group.request: (&(objectClass=group)(memberUid={uid}))
嗯,我想我试过了,并没有,我现在从日志文件复制到的全名和似乎工作,所以我只是改变组的名称,并应该这样做我希望。 – Nico
重命名组不够好,这就是为什么我最初的测试失败。 使用@Domain名称创建新组可行。这一方面的缺点是我需要重新申请所有小组的任务分配给新组。 – Nico