Sonar LDAP Plugin is not available in sonarqube 9.2.3

Hi Team,

I am using Sonarqube version 9.2.3 community edition (Docker based) and looking for LDAP plugin in the market place and not able to find it. How to get the LDAP plugin for the LDAP integration with the SonarQube.

Please find the attached screenshot

Thanks,
Prasad.

Hi Prasad,

since Sonarqube 8.x the ldap plugin is a builtin feature.
see

This plugin is compatible with SonarQube up to 7.9.X, and won’t be compatible with the next SonarQube versions as it’s now a built-in feature of SonarQube 8 and later.

Gilbert

2 Likes

Thank you Gilbert for your information.

Hi Gilbert,

I added my LDAP Attributes in Sonar.properties and restarted my container and not able to detect that plugin and dont see any traces of the LDAP in the web.log either. Do we need to enable the existing LDAP plugin? or do we need to set any properties to make this LDAP plugin enabled?

Thanks,
Prasad.

Hi,

it’s activated via $SONARQUBE_HOME/conf/sonar.properties
i.e.

# LDAP CONFIGURATION
sonar.security.realm=LDAP
sonar.authenticator.downcase=true

ldap.url=ldaps://...
ldap.bindDn=xxx
ldap.bindPassword={aes-gcm}....
ldap.authentication=simple

# User Configuration
ldap.user.baseDn=..=..,DC=..,DC=..
ldap.user.realNameAttribute=cn
ldap.user.LastNameAttribute=sn
ldap.user.firstNameAttribute=givenName
ldap.user.emailAttribute=mail
ldap.user.request=(&(objectClass=user)(sAMAccountName={login}))

# Group Configuration
ldap.group.baseDn=..=..,DC=..,DC=..
ldap.group.idAttribute=cn
ldap.group.request=(&(objectClass=group)(member={dn}))

you have to set loglevel DEBUG to see it in web.log
Then the log should show such entries

DEBUG web[xxxxxxx][o.s.a.l.LdapSearch] Search: LdapSearch{baseDn= … }
DEBUG web[xxxxxxx][o.s.a.l.LdapContextFactory] Initializing LDAP context {java.naming.referral=follow, java.naming.security.principal= …url=ldaps:// …}
DEBUG web[xxxxxxx][o.s.s.a.UserRegistrarImpl] List of groups returned by the identity provider '[ …

Gilbert

1 Like