LDAP authentication not working

Hello,

I’m trying to setup the LDAP authentication process but without any luck.
Here under is my config:
xwiki.authentication.authclass=org.xwiki.contrib.ldap.XWikiLDAPAuthServiceImpl
xwiki.authentication.ldap=1
xwiki.authentication.ldap.server=
xwiki.authentication.ldap.port=389
xwiki.authentication.ldap.bind_DN=cn=staging\SVC_XWIKI
xwiki.authentication.ldap.bind_pass=
xwiki.authentication.ldap.base_DN=DC=staging,DC=,DC=com
xwiki.authentication.ldap.UID_attr=sAMAccountName
xwiki.authentication.ldap.fields_mapping=name=sAMAccountName,last_name=sn,first_name=givenName,fullname=displayName,email=mail,ldap_dn=dn
xwiki.authentication.ldap.update_user=1
xwiki.authentication.ldap.trylocal=1

Don’t find any error in Catalina’s logs.

Also did a trace to find out for LDAP but sounds like the search does’t try to query the LDAP.

Any idea ?

Regards,

Hi,

What’s the LDAP version that you are using? Depending on that, you might discover in http://extensions.xwiki.org/xwiki/bin/view/Extension/LDAP/Application#HEnablingLDAPauthenticationonawiki that com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl shoud be used as authclass.

Hope it helps,
Alex

Hello,
You can enable LDAP logging to debug: http://extensions.xwiki.org/xwiki/bin/view/Extension/LDAP/Authenticator/#HEnableLDAPdebuglog

Pascal B

Hello,

Thank you for your answer.
If I use that one
com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl
I have this issue :
Failed to initialize AuthService com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl using Reflection, trying default implementations using ‘new’.

when staring xwiki

Regards,

You must use
xwiki.authentication.authclass=org.xwiki.contrib.ldap.XWikiLDAPAuthServiceImpl
instead and of course install “LDAP Authenticator” extension with extension manager and restart Tomcat.

Hello,

Thank you, I found the issue with your help ! xwiki.authentication.ldap.bind_DN=cn=staging\SVC_XWIKI is no correct, I changed to xwiki.authentication.ldap.bind_DN=SVC_XWIKI

And now I can connect

Regards,