2

I google a lot but I couldn't find an answer for how to integrate LDAP with sonarqube. Most of the documents are showing that we need to modify in /sonarqube-6.2/conf/sonar.properties as below;

# LDAP configuration 
# General Configuration 
sonar.security.realm=LDAP 
ldap.url=ldap://myserver.mycompany.com 
ldap.bindDn=my_bind_dn 
ldap.bindPassword=my_bind_password 

# User Configuration 
ldap.user.baseDn=ou=Users,dc=mycompany,dc=com 
ldap.user.request=(&(objectClass=inetOrgPerson)(uid={login})‌​)
ldap.user.realNameAttribute=cn ldap.user.emailAttribute=mail 

# Group Configuration 
ldap.group.baseDn=ou=Groups,dc=sonarsource,dc=com 
ldap.group.request=(&(objectClass=posixGroup)(memberUid={uid‌​}))

but the thing is I could find any block with LDAP integration as above in sonar.properties. Do I need to add these lines manually or will it be there already? I also tried with plugin but I couldn't find the next steps using plugin after installation.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • # LDAP configuration # General Configuration sonar.security.realm=LDAP ldap.url=ldap://myserver.mycompany.com ldap.bindDn=my_bind_dn ldap.bindPassword=my_bind_password # User Configuration ldap.user.baseDn=ou=Users,dc=mycompany,dc=com ldap.user.request=(&(objectClass=inetOrgPerson)(uid={login})) ldap.user.realNameAttribute=cn ldap.user.emailAttribute=mail # Group Configuration ldap.group.baseDn=ou=Groups,dc=sonarsource,dc=com ldap.group.request=(&(objectClass=posixGroup)(memberUid={uid})) –  Mar 14 '17 at 02:21
  • those LDAP details should be in the question body not the comments! Please [edit](http://stackoverflow.com/posts/42776653/edit) your question and add it there, so the configuration is actually readable and with the rest of the configuration. – Adrian Sanguineti Mar 14 '17 at 05:00

1 Answers1

1

LDAP-related properties are not in the SonarQube built-in sonar.properties configuration file because out-of-the box SonarQube does not have LDAP capability.

Keep in mind that SonarQube has a plugin-based architecture. LDAP functionality comes with the LDAP Plugin . That documentation page details the various configuration properties, together with some examples.

Nicolas B.
  • 7,245
  • 17
  • 29
  • thank you for your response @Nicolas. But the thing is do I need to add this code by myself in sonar.properties? `sonar.security.realm=LDAP ldap.url=ldap://myserver.mycompany.com ldap.bindDn=my_bind_dn ldap.bindPassword=my_bind_password # User Configuration ldap.user.baseDn=ou=Users,dc=mycompany,dc=com ldap.user.request=(&(objectClass=inetOrgPerson)(uid={login})) ldap.user.realNameAttribute=cn ldap.user.emailAttribute=mail # Group Configuration ldap.group.baseDn=ou=Groups,dc=sonarsource,dc=com ldap.group.request=(&(objectClass=posixGroup)(memberUid={uid}))` –  Mar 14 '17 at 14:18
  • Yes, LDAP Plugin configuration must be set in _sonar.properties_. Actual properties values depend on your LDAP deployment. – Nicolas B. Mar 14 '17 at 15:28
  • Thak you @Nicolas –  Mar 14 '17 at 15:33
  • Can you explain a bit more. Because I am a beginner. I need to paste the above LDAP configuration in sonar.properties right?. then what is the use of sonar LDAP plugin that I installed –  Mar 15 '17 at 14:06