LDAP Intergration


(Abdul) #1

Hi All,

I am working with SonarQube * Version 7.2.1, trying to integrate ldap, I have made the changes in the sonar.properties as follows. However I am unable to login. This is the first time am working with sonar ldap and really need some help.

Sonar.properties :

#LDAP COnfiguration :
sonar.security.realm=LDAP
sonar.authenticator.downcase=false	
ldap.url=ldap://wwldap.*******.net:389
ldap.bindDn=CN=***ldap,OU=Service Accounts,OU=WWDEL,OU=WorldWide,DC=******,DC=net
ldap.bindPassword=**********!
ldap.authentication=simple
ldap.StartTLS=false


#USER MAPPING :
ldap.user.baseDn=DC=******,DC=net
ldap.user.request=(&(objectClass=user)(sAMAccountName={login})(memberOf=cn=shr-sd-
tooloperations,OU=SharedMbx,OU=WWEXCH,OU=WorldWide,DC=*******,DC=net))
ldap.user.realNameAttribute=cn
ldap.user.emailAttribute=mail


#GROUP MAPPING :
ldap.group.baseDn=(&(objectClass=group)(memberUid={shr-sd-tooloperations,OU=SharedMbx,OU=WWEXCH,OU=WorldWide,DC=******,DC=net}))
ldap.group.request=(&(objectClass=group)(memberUid={uid}))
ldap.group.idAttribute=cn

When i restart the service i didn’t get any error, when i try to login, the user screen keeps spinning and never let the user in. so I have to cancel the login and this is what the web.log looks like :

 2019.03.19 14:42:44 INFO  web[][o.s.s.p.p.PlatformLevelStartup] Running Community Edition
2019.03.19 14:42:44 INFO  web[][o.s.s.p.Platform] WebServer is operational
2019.03.19 15:12:21 ERROR web[AWmWZ/AI1GKuhA0aAAAF][o.s.s.a.RealmAuthenticator] Error during authentication
org.sonar.plugins.ldap.LdapException: Unable to retrieve groups for user q84**** in <default>
        at org.sonar.plugins.ldap.LdapGroupsProvider.getGroups(LdapGroupsProvider.java:85)
        at org.sonar.plugins.ldap.LdapGroupsProvider.doGetGroups(LdapGroupsProvider.java:57)
        at org.sonar.server.authentication.RealmAuthenticator.synchronize(RealmAuthenticator.java:140)
        at org.sonar.server.authentication.RealmAuthenticator.doAuthenticate(RealmAuthenticator.java:111)
        at org.sonar.server.authentication.RealmAuthenticator.authenticate(RealmAuthenticator.java:88)
        at org.sonar.server.authentication.CredentialsAuthenticator.authenticate(CredentialsAuthenticator.java:62)
        at org.sonar.server.authentication.CredentialsAuthenticator.authenticate(CredentialsAuthenticator.java:50)
        at org.sonar.server.authentication.ws.LoginAction.authenticate(LoginAction.java:121)
        at org.sonar.server.authentication.ws.LoginAction.doFilter(LoginAction.java:102)
        at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126)
        at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:95)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:87)
        at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:71)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:76)
        at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:61)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.platform.web.requestid.RequestIdFilter.doFilter(RequestIdFilter.java:63)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
        at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)
Caused by: javax.naming.InvalidNameException: (&(objectClass=group)(memberUid={shr-sd-tooloperations,OU=SharedMbx,OU=WWEXCH,OU=WorldWide,DC=*******,DC=net})): [LDAP: error code 34 - 0000208F: NameErr: DSID-03100225, problem 2006 (BAD_NAME), data 8349, best match of:
        '(&(objectClass=group)(memberUid={shr-sd-tooloperations,OU=SharedMbx,OU=WWEXCH,OU=WorldWide,DC=*********,DC=net}))'
]
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3093)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2891)
        at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1846)
        at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1769)
        at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1786)
        at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:418)
        at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:396)
        at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:378)
        at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:286)
        at org.sonar.plugins.ldap.LdapSearch.find(LdapSearch.java:130)
        at org.sonar.plugins.ldap.LdapGroupsProvider.getGroups(LdapGroupsProvider.java:78)
        ... 51 common frames omitted

Thank you for your time, Appreciate your help.

Regards,
r_yans