Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) SonarQube community v9.9.1
- how is SonarQube deployed: Docker
- what are you trying to achieve: Configure LDAP for our Active Directory
- what have you tried so far to achieve this: Various attempts at changing sonarqube.properties
Hello,
I can’t seem to get my LDAP configuration right. The connection shows OK in the logs and the server boots up fine, however when trying to log in I receive HTTP 401 authentication failed. I know for certain that my credentials are correct. This is my properties file:
# LDAP configuration
# General Configuration
sonar.authenticator.downcase=true
sonar.security.realm=LDAP
ldap.url=ldap://domainName:389
ldap.bindDn=CN=SAATLASSIAN,OU=ServiceAccounts,OU=BRZ,OU=FR,DC=domainName
ldap.bindPassword=password
# User Configuration
ldap.user.baseDn=OU=LKZ,OU=US,DC=domainName
ldap.user.request=(&(objectClass=user)(memberOf=CN=GG-US-LKZ-JIRA,OU=Global Groups,OU=GroupAccounts,OU=LKZ,OU=US,DC=domainName))
ldap.user.realNameAttribute=cn
ldap.user.emailAttribute=mail
sonar.log.level.ldap=DEBUG
I’m able to use ldapsearch from the sonarqube server. Specifically, this command
ldapsearch -v -x -D "SAAtlassian" -w 'password' -b "OU=LKZ,OU=US,DC=domainName" "(memberOf=CN=GG-US-LKZ-JIRA,OU=Global Groups,OU=GroupAccounts,OU=LKZ,OU=US,DC=domainName)" -H "ldap://domainName" "(&(objectClass=user))"
returns a list of users that I want to be able to log in with. This is an example of a user returned by the command:
# John Smith, UserAccounts, LKZ, US, domainName
dn: CN=John Smith,OU=UserAccounts,OU=LKZ,OU=US,DC=domainName
What am I missing?