I am using xWiki version 14.10.18 (LTS).
I am trying to set up authentication in ActiveDirectory via LDAP. I need to configure connection to two ADs, as some users are located on another server.
If I specify settings for only one server, everything works fine.
Example:
xwiki.authentication.authclass=org.xwiki.contrib.ldap.XWikiLDAPAuthServiceImpl
xwiki.authentication.ldap=1
xwiki.authentication.ldap.trylocal=1
xwiki.authentication.ldap.server=ip-address1
xwiki.authentication.ldap.port=389
xwiki.authentication.ldap.base_DN=dc=subdomain1,dc=domain,dc=com
xwiki.authentication.ldap.bind_DN=cn=robot,ou=temp,dc=my,dc=domain,dc=com
xwiki.authentication.ldap.bind_pass=passw1
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.groupcache_expiration=3600
But if I try to connect the second server, I get an error every time I log in.
org.xwiki.contrib.ldap.XWikiLDAPException: Error number 0 in 5: LDAP bind failed with LDAPException.
Caused by: com.novell.ldap.LDAPException: Invalid Credentials
Example settings: (used the instructions from https://extensions.xwiki.org/xwiki/bin/view/Extension/LDAP/Authenticator/#HGenericLDAPconfiguration)."
xwiki.authentication.authclass=org.xwiki.contrib.ldap.XWikiLDAPAuthServiceImpl
xwiki.authentication.ldap=1
xwiki.authentication.ldap.trylocal=1
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.groupcache_expiration=3600
xwiki.authentication.ldap.httpHeader=REMOTE_USER
xwiki.authentication.ldap.remoteUserParser=(.+)@(.+)
xwiki.authentication.ldap.remoteUserMapping.1=uid
xwiki.authentication.ldap.remoteUserMapping.2=domain,ldap_server,ldap_port,ldap_base_DN,ldap_bind_DN,ldap_bind_pass
xwiki.authentication.ldap.remoteUserMapping.ldap_server=DOMAIN1=ip-address1|DOMAIN2=ip-address2
xwiki.authentication.ldap.remoteUserMapping.ldap_port=DOMAIN1=389|DOMAIN2=389
xwiki.authentication.ldap.remoteUserMapping.ldap_base_DN=DOMAIN1=dc=subdomain1,dc=domain,dc=com|DOMAIN2=dc=subdomain2,dc=domain,dc=com
xwiki.authentication.ldap.remoteUserMapping.ldap_bind_DN=DOMAIN1=cn=robot1,ou=temp,dc=subdomain1,dc=domain,dc=com|DOMAIN2=cn=robot2,ou=temp,dc=subdomain2,dc=domain,dc=com
xwiki.authentication.ldap.remoteUserMapping.ldap_bind_pass=DOMAIN1=passw1|DOMAIN2=passw2
In the second case i use for login “user@domain”
What’s my mistake?