I’m trying to setup LDAP for my XWiki installation, but it isn’t working. It always returns “Error: Invalid credentials” when I try to login. My xwiki.cfg looks like this:
xwiki.authentication.authclass=org.xwiki.contrib.ldap.XWikiLDAPAuthServiceImpl
xwiki.authentication.ldap=1
xwiki.authentication.ldap.trylocal=1
xwiki.authentication.ldap.server=<server>
xwiki.authentication.ldap.port=389
xwiki.authentication.ldap.bind_DN=<domain>\\{0}
xwiki.authentication.ldap.bind_pass={1}
xwiki.authentication.ldap.UID_attr=cn
xwiki.authentication.ldap.base_DN=dc=<domain>,dc=<suffix>
xwiki.authentication.ldap.fields_mapping=last_name=sn,first_name=givenName,email=mail,phone=telephoneNumber
xwiki.authentication.ldap.update_user=1
Note that <server>, <domain>, and <suffix> have the proper values in the actual file.
I have tried using a service account in “xwiki.authentication.ldap.bind_DN” and “xwiki.authentication.ldap.bind_pass”, and I’ve tried using “xwiki.authentication.ldap.UID_attr=sAMAccountName” instead of cn.
Note also that I have an existing XWiki 7.1.2 install, and am trying to install this new version (11.1) on a new server and migrate the data. These settings work fine in 7.1.2, but I’m using the LDAP extension in 7.1.2 and am trying to do this via the xwiki.cfg this time.
Any idea what I’m doing wrong?