Uploaded image for project: 'Jetspeed 2 (Retired)'
  1. Jetspeed 2 (Retired)
  2. JS2-1128

Spring LDAP DefaultDirContextValidator bug LDAP-189 causing unexpected error when borrowing new ContextSource from pool

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.1
    • 2.2.1
    • LDAP
    • None

    Description

      I encountered unexpected errors during LDAP testing with the Spring LDAP PoolingContextSource failing to borrow new DirContexts.
      This turned out, after long, long, debugging to be caused by a bug in the DefaultDirContextValidator which "forgets" to set the right SearchControls scope (OBJECT_SCOPE) thereby falling back to the default ONELEVEL_SCOPE.
      Looking through Spring LDAP JIRA issue, this one turned out to be reported already but still not yet fixed: http://jira.springframework.org/browse/LDAP-189

      A workaround is easy to provide by setting a properly configured SearchControls object ourselves in the Spring assembly, which I will commit as example and default configuration in our security-ldap.xml Spring assembly file.

      Attachments

        Activity

          People

            ate Ate Douma
            ate Ate Douma
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: