Hello XNAT Community,
I'm experiencing issues configuring LDAP authentication with XNAT 1.9.0 using an Active Directory LDAP server. Despite multiple troubleshooting steps, I continue to receive a NullPointerException during the authentication process. I'm seeking assistance to resolve this issue.
Environment Details:
XNAT Version: 1.9.0
LDAP Server: Active Directory LDAP
Server OS: Ubuntu 24.04 LTS
Java Version: OpenJDK 1.8
Tomcat Version: Tomcat 9
LDAP Plugin: ldap-auth-plugin-1.2.0.jar (from the XNAT plugin repository)
Issue Summary:
When attempting to log in with an LDAP user, XNAT throws a NullPointerException, indicating that the username is null during the authentication process. The error occurs even though the LDAP validation script confirms successful authentication for both the bind user and the LDAP user.
Note: I have redacted sensitive information such as passwords and actual user data to maintain security and privacy.
Error Message:
LDAP Configuration (ldap1-provider.properties):
LDAP Entry for the User (Using ldapsearch):
Validation Script Output:
Steps I have taken to Resolve the Issue:
Verified LDAP Attributes:
Confirmed that sAMAccountName, givenName, sn, and userPrincipalName are present for the user.
Adjusted ldap1-provider.properties:
Set user.id to sAMAccountName to avoid special characters.
Ensured that attribute names match exactly and are case-sensitive.
Validated LDAP Credentials:
Used the validation script provided with the LDAP plugin, which confirms successful authentication for both the bind user and the LDAP user.
Tested with Another LDAP User:
Attempted to log in with a different LDAP user, encountering the same error.
Relevant Log Excerpts:
Attachments:
ldap1-provider.properties file
Full stack trace of the error
Relevant log files
Conclusion:
Despite extensive troubleshooting, I have been unable to resolve the NullPointerException when attempting to authenticate LDAP users.
It is strange since I was able to set up many other applications using similar AD properties. Any insights or suggestions from the community would be greatly appreciated.
Thank you for your assistance.
Best regards,
Aymane