Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-55923

Unable to create Jira issue from Confluence page due to unintended cache

    XMLWordPrintable

Details

    Description

      Summary

      Unable to create Jira issue from Confluence page due to unintended cache.

      This problem is reproducible when integrating Confluence with more than one Jira instances.

      Environment

      • More than one Jira instances (I used Jira 7.10.1)

      Steps to Reproduce

      1. Prepare one Confluence instance and more than one Jira instances (e.g. Jira1 and Jira2)
      2. Make all the applications (Confluence, Jira1 and Jira2) use a same user base
        • e.g. I set up Jira 1 as Jira user server and configured Confluence and Jira2 to use it as user directory
      3. Create the following users in the user base
        • A user (named "User A") who has permissions to access (including create issue permission) all the applications
        • A user (named "User B") who has permissions to access only Confluence and Jira1 (no access of Jira2)
      4. Create application links using OAuth (with impersonation) as follows
        • Confluence <-> Jira1
        • Confluence <-> Jira2
      5. Logout from Confluence
      6. Login Confluence as "User B"
      7. Try to create an issue in Jira2 from a Confluence page
        • "User B" cannot create an issue as he/she doesn't have access of Jira2
      8. Logout Confluence
      9. Login Confluence as "User A"
      10. Try to create an issue in Jira2 from the Confluence page

      Expected Results

      "User A" should be able to create the issue as he/she has access of Jira2.

      Actual Results

      "User A" was not able to create the issue with an error "The version of selected Jira server is not supported. You may want to upgrade to the newer version or create issue in Jira." even though he/she has access of Jira2. (Of course, the Jira instance is supported version as well.)

      In case that "User A" tries to create the issue before "User B" do it, the issue creation continues to work without any problem for a while. (Technically, it seems to work until the cache is refreshed.)

      Notes

      The above behavior is due to Jira Resources Manager cache.

      Workaround

      Never use the caches

      Configure Confluence not to use the caches.

      1. Go to Confluence administrations > Cache Statistics > Jira Resources Manager and flush the cache
      2. Change the cache size to "1" with following the information in Cache Performance Tuning

      Please be careful to use this workaround. This workaround might cause some performance problem.

      Delete the wrong caches and create appropriate ones hourly

      The caches are refreshed if they are not accessed for an hour. That's why, executing following commands hourly (by cron or something like that) could be the workaround.

      curl -u <user>:<pass> 'http://<jira-base-url>/rest/cacheManagement/1.0/cacheEntries' -X DELETE --data 'cacheName=com.atlassian.confluence.plugins.createjiracontent.CachedJiraResourcesManager'
      curl -u <user>:<pass> 'http://<jira-base-url>/rest/createjiracontent/1.0/get-jira-servers'
      

      Please replace <user>, <pass> with credentials of a Confluence admin user who has accesses of all the integrated Jira instances.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yokamoto Yuki Okamoto (Inactive)
              Votes:
              22 Vote for this issue
              Watchers:
              24 Start watching this issue

              Dates

                Created:
                Updated: