I installed an Xwiki for testing purposes.
The latest Docker Compose version is installed.
I’ve been trying to get LDAP working for two days now. Our LDAP cluster is a 389 DS.
As administrator, I installed LDAP Authenticator 9.16.1 and LDAP Application 9.16.1.
I read that LDAP needs to be enabled in the xwiki.cfg file.
With
“docker exec -it xwiki-mariadb-tomcat-web sh”
I have the
/webapps/ROOT/WEB-INF/xwiki.cfg
added:
#-# LDAP authentication service
xwiki.authentication.authclass=org.xwiki.contrib.ldap.XWikiLDAPAuthServiceImpl
#-# Turn LDAP authentication on - otherwise only XWiki authentication
#-# - 0: disable
#-# - 1: enable
#-# The default is 0
xwiki.authentication.ldap=1
#-# Enable local accounts in addition to LDAP.
#-# Without this setting you will be unable to log into XWiki with local accounts.
#-# - 0: disable
#-# - 1: enable
#-# The default is 0
xwiki.authentication.ldap.trylocal=1
#-# SSL connection to LDAP server
#-# - 0: normal
#-# - 1: SSL
#-# The default is 0
xwiki.authentication.ldap.ssl=1
I added the LDAP CA to the keystore:
keytool -import -trustcacerts -alias ca -file cacert.crt -keystore jssecacerts
(jssecacerts didn’t exist yet)
Afterwards, I read that the xwiki.cfg file will no longer be supported in the future, so I copied everything into xwiki.properties again.
It’s not working.
I’m getting an error message that the username and password are incorrect.
In the log I see:
DEBUG x.c.l.XWikiLDAPAuthServiceImpl - LDAP authentication failed for user
WARN nticationFailureLoggerListener - Authentication failure with login
DEBUG x.c.l.XWikiLDAPAuthServiceImpl - XWikiUser: null
/wikis/xwiki/localization/translations?locale=de-AT&prefix=&key=url.api.followLinkConfirmationText\] DEBUG x.c.l.XWikiLDAPAuthServiceImpl - The provided user is null. We don’t try to authenticate, it probably means the user is in non logged mode.
\[/rest/wikis/xwiki/localization/translations?locale=de-AT&prefix=&key=url.api.followLinkConfirmationText\] DEBUG x.c.l.XWikiLDAPAuthServiceImpl - XWikiUser: null
I’ve also read that the settings in xwiki.cfg are overridden by the UI (LDAP), but I can’t find any LDAP configurations in either the .cfg or the properties file (apart from the ones I copied in myself).
I think I’m missing something obvious! If I configure LDAP via the UI, I don’t see it in xwiki.cfg?
I’ve also read that there should be a button in the UI to test the LDAP connection. I don’t have that either.
Does anyone have any idea where I could start looking?