Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-30737

Better handler the error when using "top" as objectclass filter in the LDAP user directory settings

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Won't Do
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? See the corresponding suggestion.

      The "top" objectclass is a obstruct class in LDAP which suppose not to be use as the object filter when setting up the LDAP user directory. But in case that it is using, the synchronization will be failed with the following error message:

      2012-11-28 11:56:21,332 QuartzWorker-1 DEBUG ServiceRunner     [atlassian.crowd.directory.SpringLDAPConnector] Performing group search: baseDN = ou=groups,o=jira,dc=momo,dc=com - filter = (objectclass=top)
      2012-11-28 11:56:21,334 QuartzWorker-1 FATAL ServiceRunner     [ldap.mapper.entity.LDAPGroupAttributesMapper] The following record does not have a groupname: {ou=ou: groups, objectclass=objectClass: organizationalUnit, top}
      2012-11-28 11:56:21,335 QuartzWorker-1 INFO ServiceRunner     [atlassian.crowd.directory.DbCachingRemoteDirectory] failed synchronisation complete in [ 14ms ]
      2012-11-28 11:56:21,371 QuartzWorker-1 ERROR ServiceRunner     [atlassian.crowd.directory.DbCachingDirectoryPoller] Error occurred while refreshing the cache for directory [ 10000 ].
      com.atlassian.crowd.exception.OperationFailedException: org.springframework.ldap.UncategorizedLdapException: Unable to find the groupname of the principal.
      	at com.atlassian.crowd.directory.SpringLDAPConnector.searchEntitiesWithRequestControls(SpringLDAPConnector.java:416)
      	at com.atlassian.crowd.directory.SpringLDAPConnector.searchEntities(SpringLDAPConnector.java:384)
      	at com.atlassian.crowd.directory.SpringLDAPConnector.searchGroupObjectsOfSpecifiedGroupType(SpringLDAPConnector.java:1079)
      	at com.atlassian.crowd.directory.SpringLDAPConnector.searchGroupObjects(SpringLDAPConnector.java:1127)
      	at com.atlassian.crowd.directory.SpringLDAPConnector.searchGroups(SpringLDAPConnector.java:1136)
      	at com.atlassian.crowd.directory.ldap.cache.RemoteDirectoryCacheRefresher.findAllRemoteGroups(RemoteDirectoryCacheRefresher.java:50)
      	at com.atlassian.crowd.directory.ldap.cache.RemoteDirectoryCacheRefresher.synchroniseAllGroups(RemoteDirectoryCacheRefresher.java:74)
      	at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:42)
      	at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:619)
      	at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:63)
      	at com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50)
      	at com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJob.execute(DirectoryPollerJob.java:34)
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
      	at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72)
      	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      Caused by: org.springframework.ldap.UncategorizedLdapException: Unable to find the groupname of the principal.
      	at com.atlassian.crowd.directory.ldap.mapper.entity.LDAPGroupAttributesMapper.getGroupNameFromAttributes(LDAPGroupAttributesMapper.java:148)
      	at com.atlassian.crowd.directory.ldap.mapper.entity.LDAPGroupAttributesMapper.mapGroupFromAttributes(LDAPGroupAttributesMapper.java:109)
      	at com.atlassian.crowd.directory.ldap.mapper.GroupContextMapper.mapFromContext(GroupContextMapper.java:53)
      	at org.springframework.ldap.core.ContextMapperCallbackHandler.getObjectFromNameClassPair(ContextMapperCallbackHandler.java:67)
      	at org.springframework.ldap.core.CollectingNameClassPairCallbackHandler.handleNameClassPair(CollectingNameClassPairCallbackHandler.java:50)
      	at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:297)
      	at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:237)
      	at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:624)
      	at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:535)
      	at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper$1.call(LdapTemplateWithClassLoaderWrapper.java:56)
      	at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper$1.call(LdapTemplateWithClassLoaderWrapper.java:53)
      	at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper.invokeWithContextClassLoader(LdapTemplateWithClassLoaderWrapper.java:43)
      	at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper.search(LdapTemplateWithClassLoaderWrapper.java:53)
      	at com.atlassian.crowd.directory.SpringLDAPConnector.searchEntitiesWithRequestControls(SpringLDAPConnector.java:412)
      	... 14 more
      

      This is not clear for the user to identified the root cause of the issue.

      We should :

      1. Warn the user in the documentation.
      2. Make a tips in the objectclass filter area
      3. Have a clear error message instead of fatal error.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yilinmo Yilin (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: