LDAP : Authentification login failure [cause|No user details]

Hi

Configuration : Red Hat Enterprise Linux Server release 7.1 (Maipo)
SonarQube : Version 6.7 (build 33306)

# LDAP configuration
sonar.security.realm=LDAP
ldap.url=ldap://srvldap02.contoso.com:389
ldap.bindDn=CN=requestuser-ldap,OU=USER-GENERIC,OU=_ou,DC=contoso,DC=com
ldap.bindPassword=password

# User Configuration
ldap.user.baseDn=OU=_ou,DC=contoso,DC=com
ldap.user.request=(&(objectClass=user)(sAMAccountName={login}))
ldap.user.emailAttribute=mail
ldap.user.realNameAttribute=cn
ldap.windows.user.realNameAttribute=displayName

2018.08.23 11:16:42 INFO web[][o.s.p.l.LdapContextFactory] Test LDAP connection on ldap://2018.08.23 11:16:42 INFO web[][o.s.p.l.LdapContextFactory] Test LDAP connection on ldap://srvldap02.contoso.com:389: OK

When a try to login :

2018.08.23 15:21:06 DEBUG web[AWVm2kuCMYpwFNt4AAA5][auth.event] login failure [cause|User must be authenticated][method|BASIC][provider|LOCAL|local][IP|192.168.17.89|][login|]
2018.08.23 15:21:07 DEBUG web[AWVm2kuCMYpwFNt4AAA8][auth.event] login failure [cause|User must be authenticated][method|BASIC][provider|LOCAL|local][IP|192.168.17.89|][login|]
2018.08.23 15:21:07 DEBUG web[AWVm2kuCMYpwFNt4AAA+][auth.event] login failure [cause|User must be authenticated][method|BASIC][provider|LOCAL|local][IP|192.168.17.89|][login|]
2018.08.23 15:21:11 DEBUG web[AWVm2kuCMYpwFNt4AAA/][o.s.p.l.LdapUsersProvider] Requesting details for user lbailly
2018.08.23 15:21:11 DEBUG web[AWVm2kuCMYpwFNt4AAA/][o.s.p.l.LdapSearch] Search: LdapSearch{baseDn=OU=_ou,DC=contoso,DC=com, scope=subtree, request=(&(objectClass=user)(sAMAccountName={0})), parameters=[lbailly], attributes=[mail, cn]}
2018.08.23 15:21:11 DEBUG web[AWVm2kuCMYpwFNt4AAA/][o.s.p.l.LdapContextFactory] Initializing LDAP context {java.naming.provider.url=ldap://srvldap02.contoso.com:389, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.security.principal=requestuser-ldap,OU=USER-GENERIC,OU=_ou,DC=contoso,DC=com, com.sun.jndi.ldap.connect.pool=true, java.naming.security.authentication=simple, java.naming.referral=follow}
2018.08.23 15:21:11 DEBUG web[AWVm2kuCMYpwFNt4AAA/][o.s.p.l.LdapUsersProvider] User lbailly not found in <default>
2018.08.23 15:21:11 DEBUG web[AWVm2kuCMYpwFNt4AAA/][auth.event] login failure [cause|No user details][method|FORM][provider|REALM|LDAP][IP|192.168.17.89|][login|lbailly]

if you have an idea of ​​my configuration error ??

thank you in advance

Hi,

Could you please check that the user ‘lbailly’ exist in your LDAP ?

Regards

Hi,

It is my user, i’m sure it exist.

Thank for the reply

Then could you check in LDAP that the attribute sAMAccountName of this user is well defined to lbailly ?

Capture

Ok, then I’ve no idea what is happening to you, I’m sorry.