Skip to content

i2b2 1.8.3 PM Cell with LDAP authentication returns an invalid XML response when Active Directory rejects invalid credentials. #452

Description

@rra2013

i2b2 1.8.3 PM Cell with LDAP authentication returns an invalid XML response when Active Directory rejects invalid credentials.

AD correctly returns LDAP error code 49 with diagnostic code data 52e. The exception message contains a NULL character (Unicode 0). ServicesHandler forwards e.getMessage() unfiltered to MessageFactory.doBuildErrorResponse().

Axiom/Woodstox then fails with:

WstxUnexpectedCharException: Illegal character (NULL, unicode 0) encountered: not valid in any content

As a result, the webclient receives an AJAX failure and displays:

The PM Cell is down or the address in the properties file is incorrect.

Expected result:

A valid i2b2 XML error response containing Authentication failed.

Suggested fix: Catch javax.naming.AuthenticationException in SecurityAuthenticationLDAP and return a neutral message such as Authentication failed. Additionally, all exception messages included in XML should be stripped of characters invalid under XML 1.0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions