LDAPS connection


(Fabrizio Chiaravalli) #1

Sonarqube 7.3
I am unable to use LDAPS connection against Active Directory.
Everyhing is working correctly using ldap.
Using LDAPS the system is not working, and there is no logs against the malfunction
The startup semms to nice

2018.09.25 10:54:45 INFO web[][org.sonar.INFO] Security realm: LDAP
2018.09.25 10:54:45 INFO web[][o.s.p.l.LdapSettingsManager] User mapping: LdapUserMapping{baseDn=dc=tecniplastgroup,dc=com, request=(&(objectClass=user)(sAMAccountName={0})), realNameAttribute=name, emailAttribute=mail}
2018.09.25 10:54:45 INFO web[][o.s.p.l.LdapSettingsManager] Group mapping: LdapGroupMapping{baseDn=dc=tecniplastgroup,dc=com, idAttribute=cn, requiredUserAttributes=[dn], request=(&(objectClass=group)(member={0}))}
2018.09.25 10:54:45 DEBUG web[][o.s.p.l.LdapContextFactory] Initializing LDAP context {java.naming.provider.url=ldaps://ad03.tecniplastgroup.com, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.security.principal=cn=operator01,ou=IT,ou=Finance & Control,ou=Tecniplast,ou=Divisions,dc=tecniplastgroup,dc=com, com.sun.jndi.ldap.connect.pool=true, java.naming.security.authentication=simple, java.naming.referral=follow}
2018.09.25 10:54:45 INFO web[][o.s.p.l.LdapContextFactory] Test LDAP connection on ldaps://ad03.tecniplastgroup.com: OK
2018.09.25 10:54:45 INFO web[][org.sonar.INFO] Security realm started

But after a test login it doesn’t work and there is no ERROR logs
2018.09.25 10:56:23 DEBUG web[AWYQKGCMc4Zc1O/gAAAT][o.s.p.l.LdapUsersProvider] Requesting details for user fchiaravalli
2018.09.25 10:56:23 DEBUG web[AWYQKGCMc4Zc1O/gAAAT][o.s.p.l.LdapSearch] Search: LdapSearch{baseDn=dc=tecniplastgroup,dc=com, scope=subtree, request=(&(objectClass=user)(sAMAccountName={0})), parameters=[fchiaravalli], attributes=[mail, name]}
2018.09.25 10:56:23 DEBUG web[AWYQKGCMc4Zc1O/gAAAT][o.s.p.l.LdapContextFactory] Initializing LDAP context {java.naming.provider.url=ldaps://ad03.tecniplastgroup.com, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.security.principal=cn=operator01,ou=IT,ou=Finance & Control,ou=Tecniplast,ou=Divisions,dc=tecniplastgroup,dc=com, com.sun.jndi.ldap.connect.pool=true, java.naming.security.authentication=simple, java.naming.referral=follow}


(Fabrizio Chiaravalli) #2

solved,
against active directory I used the ldap/ldaps port 3268/3269 and now it is working correctly.
Using the default port the response from the ldaps servers was very slow, it was not possible to work.
The connection from my sonarqube server and tje ldap server was not directly but through a firewall/gateway.