SonarQube 4.4 LDAP Plugin 1.4+AD

2019-09-08 01:17发布

I'm triying to make sonar work with the LDAP+AD authentication but I'm having a lot of trouble geting it to work. I'm either getting the "org.sonar.api.utils.SonarException: Unable to open LDAP connection" or the "Unable to retrieve details for user xxx.xxx". Here's my current configuration:

# Configuration
sonar.security.realm=LDAP
sonar.security.savePassword=true
ldap.url=ldap://tpr.mycompany:3268

 # User Configuration
ldap.user.baseDn=OU=Users,OU=MYCOMPANY,DC=tpr,DC=mycompany,tpr.mycompany
ldap.user.request=(&(objectClass=inetOrgPerson)(uid={login}))
ldap.user.realNameAttribute=cn
ldap.user.emailAttribute=mail

ldap.bindDn=CN=my_account_name,OU=Users,OU=mycompany
ldap.bindPassword=MyPassword

# Group Configuration
ldap.group.baseDn=OU=Users,OU=MYCOMPANY,DC=tpr,DC=mycompany,tpr.mycompany
ldap.group.request=(&(objectClass=posixGroup)(memberUid={uid}))

and here's the path as shown by AD Explorer:

CN=my_account_name,OU=Users,OU=MYCOMPANY,DC=tpr,DC=mycompany,tpr.mycompany

1条回答
唯我独甜
2楼-- · 2019-09-08 01:45

I had the same issue. If you want to connect to a Active Directory then you need these additional properties:

ldap.user.loginAttribute=sAMAccountName
ldap.user.objectClass=user
查看更多
登录 后发表回答