Sonarqube group and LDAP group sync

  • I am using sonarqube 8.9.7 version.

  • I am trying to do authentication using LDAP. we have 2 groups in LDAP one group is admin and another one is normal user. = LDAP

# Set to true when connecting to a LDAP server using a case-insensitive setup.

# URL of the LDAP server. Note that if you are using ldaps, then you should install the server certificate into the Java truststore.
 ldap.url=ldap://<IP address>

# Bind DN is the username of an LDAP user to connect (or bind) with. Leave this blank for anonymous access to the LDAP directory (optional)
 ldap.bindDn=CN=BInd username ,CN=Users,DC=company name,DC=in
# Bind Password is the password of the user to connect with. Leave this blank for anonymous access to the LDAP directory (optional)
ldap.bindPassword = BindPassword

# Possible values: simple | CRAM-MD5 | DIGEST-MD5 | GSSAPI See (default: simp$

above one is for bind this is working fine.



User access is also working fine giving access only to those groups.,DC=companyName,DC=in{uid}))

# Property used to specifiy the attribute to be used for returning the list of user groups in the compatibility mode. (default: cn)

This is group access

for this I am not able to configure things.

I have 2 groups in LDAP sonarUsers and sonarAdmin and created same group in Sonarqube and give
permission for sonarAdmin.

please help me to sync the groups.

Thanks in Advance

Hey there.

You can see if Group Mapping is working correctly (SonarQube can find the groups a user belongs to in AD) by turning on DEBUG level logs (Global Administration > System > Log Level), initating a login by an externally authenticated user and checking your web.log file.

2020.09.23 00:37:52 DEBUG web[AXS3YT9O4P5KvVE3AApT][o.s.s.a.UserRegistrarImpl] List of groups returned by the identity provider ‘[G_Group1, G_Group2]’

You’ll need to adjust your* settings until the proper list of groups is returned.

Hi Colin

Thanks for your reply.

I tried debug level i got

[o.s.s.a.UserRegistrarImpl] List of groups returned by the identity provider '[]'

How can I get groups?

Hey there.

This is telling you that the inputs supplied for your* configuration isn’t returning any groups.

The,, and configured will need to capture all groups where you want membership synced in SonarQube.

Please note that there is no specific SonarQube logic here, or any of the values supplied for LDAP integration – the values of and are simply transferred over to a Java implementation of ldapsearch. It should, in fact, be possible for you yourself to plug your LDAP configuration values into ldapsearch and see if the results are as expected.

These values will be highly specific to your LDAP configuration, so won’t be able to help you much in configuring those values.

I found the solution
the problem was with filter
ObjectClass was wrong

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.