Uploaded image for project: 'Directory Studio'
  1. Directory Studio
  2. DIRSTUDIO-753

namingContexts containing empty value throws exception on connect

Watch issueLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Done
    • 1.5.3
    • None
    • None
    • Linux (RHEL 6 x86_64)

    Description

      RFC 4512 (sec 5.1.2) suggests that an empty value in the rootDSE operational attribute namingContexts is normal, perhaps encouraged in some deployments.

      Some LDAP servers, such as recent versions of Sun/Oracle DSEE, can display namingContexts containing an empty value.

      I can't tell offhand if this is a bug with Directory Studio or JNDI. A sampling of other JNDI applications/code tested do not throw an exception on encountering the empty value.

      E.g.

      ldapsearch -x -LLL -H ldap://myhost.example.org -b '' -s base 'objectClass=*' namingContexts
      
      {noformat) dn: namingContexts: dc=example,dc=org namingContexts: namingContexts: dc=people,dc=example,dc=org {noformat}

      If an Apache Directory Studio Connection is set to the default of "Get base DNs from Root DSE", an exception is thrown on the empty value.

      Error while opening connection
       - [LDAP: error code 32 - No Such Object]
        javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name ''
      	at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3112)
      	at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3033)
      	at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2840)
      	at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1849)
      	at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1772)
      	at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:386)
      	at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:356)
      	at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper$1.run(JNDIConnectionWrapper.java:356)
      	at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.runAndMonitor(JNDIConnectionWrapper.java:1272)
      	at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.checkConnectionAndRunAndMonitor(JNDIConnectionWrapper.java:1203)
      	at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.search(JNDIConnectionWrapper.java:398)
      	at org.apache.directory.studio.ldapbrowser.core.jobs.SearchRunnable.search(SearchRunnable.java:500)
      	at org.apache.directory.studio.ldapbrowser.core.jobs.SearchRunnable.searchAndUpdateModel(SearchRunnable.java:320)
      	at org.apache.directory.studio.ldapbrowser.core.jobs.InitializeRootDSERunnable.searchRootDseEntries(InitializeRootDSERunnable.java:377)
      	at org.apache.directory.studio.ldapbrowser.core.jobs.InitializeRootDSERunnable.loadRootDSE(InitializeRootDSERunnable.java:250)
      	at org.apache.directory.studio.ldapbrowser.core.jobs.InitializeAttributesRunnable.initializeAttributes(InitializeAttributesRunnable.java:217)
      	at org.apache.directory.studio.ldapbrowser.core.jobs.InitializeAttributesRunnable.initializeAttributes(InitializeAttributesRunnable.java:195)
      	at org.apache.directory.studio.ldapbrowser.core.BrowserConnectionListener.openBrowserConnection(BrowserConnectionListener.java:118)
      	at org.apache.directory.studio.ldapbrowser.core.BrowserConnectionListener.connectionOpened(BrowserConnectionListener.java:65)
      	at org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable.runNotification(OpenConnectionsRunnable.java:132)
      	at org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:120)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
      
        [LDAP: error code 32 - No Such Object]
      

      A partial workaround is relatively easy: specify a Base DN in the Connection Browser Options

      Does it make sense for Directory Studio to ignore the empty value – or at least not throw the exception – since RootDSE is already a "standard" location?

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            tfpoage Tom Poage
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment