Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-18232

Lucene query checks plan permission against random plan

    XMLWordPrintable

Details

    Description

      Summary

      Bamboo runs permission validation against random plan when execute report

      Details

      When execute report generator Bamboo checks if user has READ permission to plan. Sometimes it checks it against another plan

      User mode

      1. Create 2 plans Plan1 and Plan2 in same project. And execute them once
      2. Create 2 users User1 and User2 in bamboo-user group (create group if necessary)
      3. Change Plan1 permissions and add User1 with View permission, remove View permission from Anonymous and logged in users
      4. Change Pla2 permissions and add User2 with View permission, remove View permission from Anonymous and logged in users
      5. Login as User1, go to Reports, choose Build Activity report for Plan1
      6. See graph with one dot
      7. Login as User2, go to Reports, choose Build Activity report for Plan2
      8. See warning message
      9. But if you login as admin and choose Plan2 for report you will see graph with one dot

      Developer mode

      1. Create 2 plans and run their builds
      2. Enable DEBUG logging for com.atlassian.bamboo.resultsummary.search.LucenePermissionChecker com.atlassian.bamboo.resultsummary.search.IndexedBuildResultsSearcherImpl
      3. Open Reports > Reports
      4. Choose one of the plan and run Build Activity report
      5. see browser URL http://localhost:9087/bamboo/reports/generateReport.action?reportKey=com.atlassian.bamboo.plugin.system.reports%3AnumberOfBuilds&selectFields=reportKey&labelTarget=&buildIds=3538945&selectFields=buildIds&groupByPeriod=AUTO&selectFields=groupByPeriod&dateFilter=None&selectFields=dateFilter&dateFrom=&dateTo=&save=Submit
      6. See application logs 2017-03-04 10:48:28,992 DEBUG [http-nio-9087-exec-1] [IndexedBuildResultsSearcherImpl] Permission READ granted for plan with id 3538945
      7. Choose second plan and run report generator
      8. See browser URL and logs, buildIds parameter in URL is not the same as Permission READ validation in logs

      Attachments

        Activity

          People

            aslaski Adam Slaski
            achystoprudov Alexey Chystoprudov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: