Uploaded image for project: 'LDAP Connector'
  1. LDAP Connector
  2. MGNLLDAP-113

Anonymous binding can't be used because of NPE when java.naming.security.principal and adminUserDN are not defined

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.9.1
    • 1.9
    • None
    • Kromeriz 108, Kromeriz 109
    • 1

      NPE occurs when java.naming.security.principal and adminUserDN are not defined. This cause that anonymous binding can't be used.

      Problem is combination of two lines in info.magnolia.jaas.sp.ldap.connection.DefaultConnectionFactory

      securityPrincipal = properties.getProperty(AttributeMap.ADMIN_USER_DN, ""); 
      and 
      if (securityPrincipal != null)
      

      First one cause that securityPrincipal is never null, so condition is everytime met.

      https://git.magnolia-cms.com/projects/ENTERPRISE/repos/ldap/browse/magnolia-ldap/src/main/java/info/magnolia/jaas/sp/ldap/connection/DefaultConnectionFactory.java?at=refs%2Ftags%2Fmagnolia-ldap-1.9#55
      https://git.magnolia-cms.com/projects/ENTERPRISE/repos/ldap/browse/magnolia-ldap/src/main/java/info/magnolia/jaas/sp/ldap/connection/DefaultConnectionFactory.java?at=refs%2Ftags%2Fmagnolia-ldap-1.9#67

        Acceptance criteria

              mdivilek Milan Divilek
              mdivilek Milan Divilek
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD