Sonar 8.9.5 LDAP configuration

Hi,

we migrated today from sonar 7.9.2 to sonar 8.9.5 which overall went smoothly.
But we now face the issue that Users cant Login through LDAP anymore.
In the logs we can see that it looks like it doesn’t even try to use LDAP:

2022.01.31 12:30:17 DEBUG web[******][auth.event] login failure [cause|User must be authenticated][method|BASIC][provider|LOCAL|local][IP|******|*********][login|]

For e.g on our test Instance with the same Version and similar configuration (identical sonar.properties File and same LDAP Server and search string) we can see that the LDAP is used to authenticate the user:

2022.01.31 13:16:09 DEBUG web[********][auth.event] login success [method|FORM][provider|REALM|LDAP][IP|*****|][login|*****]

Would appreciate any hints because currently we are out of ideas.

Thank You!

Hey there.

An issue can occur if you are using the following properties deprecated in SonarQube v8.1 and now removed.

  • ldap.user.objectClass
  • ldap.group.objectClass
  • ldap.user.loginAttribute
  • ldap.group.memberAttribute

If this applies to you, you should remove the deprecated properties and update the existing LDAP request properties (ldap.user.* and ldap.group.*).

Hi Colin,

thank you for the fast response. As far as i can see we dont use any of the deprecate properties:

# LDAP configuration
# General Configuration
sonar.security.realm=LDAP
ldap.bindDn=**
ldap.bindPassword=**
ldap.url=ldaps://**

# User Configuration
ldap.user.baseDn=**
ldap.user.request=**
ldap.user.realNameAttribute=**
ldap.user.emailAttribute=**
sonar.authenticator.downcase=true

Is there any way to check if LDAP is being used at all? We don’t see any mention of LDAP in the logs during startup.

e.g on our Test instance we see this in the web.log:

2022.01.31 11:57:42 INFO  web[][o.s.a.l.LdapContextFactory] Test LDAP connection on ldaps://***: OK

We think we found our issue. When we check the /api/system/info there is no mention of LDAP.
Because we use the same system sonar.properties file we are pretty sure it is not a issue witth it. Is there a way to check if the bundled ldap plugin is starting/working?

Hey there,

LDAP authentication is built into the core of SonarQube in v8.9 LTS and not provided via plugin.

If you change anything else in your conf/sonar.properties file and restart your server, are the changes reflected?