Uploaded image for project: 'Bamboo'
  1. Bamboo
  2. BAM-19963

Upgrade can't migrate LDAP/AD that use objectCategory filter

    XMLWordPrintable

Details

    Description

      Summary

      Upgrade will fail to migrate LDAP/AD configuration that uses objectCategory filter instead of objectClass

      Steps to Reproduce

      1. Configure Bamboo 6.5.1 to use LDAP/AD with objectCategory filter
      2. Upgrade it to Bamboo 6.6.0

      Expected Results

      Upgrade successfully migrate LDAP/AD configuration

      Actual Results

      The below exception is thrown in the atlassian-bamboo.log file:

      2018-06-26 16:36:19,095 ERROR [localhost-startStop-1] [LdapRepositoryConfigurationMigrator] Property groupSearchFilter does not define an objectClass filter
      2018-06-26 16:36:19,095 ERROR [localhost-startStop-1] [LdapRepositoryConfigurationMigrator] Property userSearchFilter does not define an objectClass filter
      2018-06-27 17:50:35,473 INFO [localhost-startStop-1] [AtlassianUserMigrator] Validated repository [hibernateRepository] with [com.atlassian.bamboo.upgrade.tasks.v6_6.ec.HibernateRepositoryConfigurationMigrator@51e45b33]
      2018-06-27 17:50:35,475 ERROR [localhost-startStop-1] [BootstrapUpgradeManagerImpl] Task 60601 failed
      java.lang.RuntimeException: com.atlassian.bamboo.upgrade.exception.ValidationException: Bamboo can't migrate Atlassian User repositories due to validation errors. Please refer to logs for more information.
      	at com.atlassian.bamboo.upgrade.tasks.validation.AtlassianUserRepositoriesAreValid.lambda$doUpgrade$0(AtlassianUserRepositoriesAreValid.java:46)
      	at com.atlassian.bamboo.upgrade.AbstractBootstrapUpgradeTask.withDatabaseConnection(AbstractBootstrapUpgradeTask.java:65)
      	at com.atlassian.bamboo.upgrade.tasks.validation.AtlassianUserRepositoriesAreValid.doUpgrade(AtlassianUserRepositoriesAreValid.java:38)
      	at com.atlassian.bamboo.upgrade.tasks.validation.AtlassianUserRepositoriesAreValid.doUpgrade(AtlassianUserRepositoriesAreValid.java:33)
      	at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.runValidationTask(BootstrapUpgradeManagerImpl.java:134)
      	at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.lambda$runValidationTasks$0(BootstrapUpgradeManagerImpl.java:93)
      	at com.atlassian.bamboo.upgrade.AbstractUpgradeManager.forEachTask(AbstractUpgradeManager.java:151)
      	at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.runValidationTasks(BootstrapUpgradeManagerImpl.java:93)
      	at com.atlassian.bamboo.setup.DefaultBootstrapManager.runValidationTasks(DefaultBootstrapManager.java:373)
      	at com.atlassian.bamboo.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:277)
      	at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:77)
      	at com.atlassian.bamboo.setup.BootstrapLoaderListener.contextInitialized(BootstrapLoaderListener.java:116)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: com.atlassian.bamboo.upgrade.exception.ValidationException: Bamboo can't migrate Atlassian User repositories due to validation errors. Please refer to logs for more information.
      	... 21 more
      

      Notes

      The validation will correctly trigger if the filter is not using either objectCategory or objectClass like:

      <userSearchFilter>(&amp;(sAMAccountName=*)(memberOf=CN=group,DC=test,DC=com))</userSearchFilter>
      

      The fix for this bug will not change that. In this case, an objectClass or objectCategory should be added to the filter in the atlassian-user.xml to proceed with the upgrade.

      Attachments

        Issue Links

          Activity

            People

              glewandowski Grzegorz Lewandowski
              klfoong Foong (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: