Load LDAP when run sonarqube container

hi folks

I would want to know how i can overwite the LDAP params in sonarqube ?

I try to load my ldap.conf when i run docker run However when i go on the URL to try to connect
i get

authentication failed

i didn’t find any information about how to do it until now :frowning:

thanks for your help

Hi there

not sure which version you are running, we run 8.2

We configure LDAP using Docker environment variables into a docker-compose file:

sonarqube:
    environment:
      SONAR_SECURITY_REALM: LDAP
      ldap.url: ${SONARQUBE_LDAP_URL}
      ldap.bindDn: ${SONARQUBE_LDAP_LOGIN}
      ldap.bindPassword: ${SECRET_SONARQUBE_LDAP_PASSWORD}
      ldap.user.baseDn: DC=net,DC=dot,DC=com
      ldap.user.request: (&(objectClass=person)(sAMAccountName={login}))

You can replace variables by actual value. Only drawback of this approach is the proper management of sensitive .bindPassword option…

1 Like

and if i want to write all the variable in Dockerfile .
I just have to do what i wrote below
ARG ldap.url=ldaps://xxx.xx:636
** ldap.bindDn=CN=xxx,OU=**