我們剛剛在測試環境中對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