Livesearch Macro is not suggesting results when anonymous access is enabled on a space used for Jira Service Desk KB

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Summary

      Livesearch Macro is not suggesting results when anonymous access is enabled on a space that has been created as Jira Service Desk Knowledge Base. In the browser Developer Tools is possible to see that an error 401 is returned when calling the search endpoint (rest/searchv3/1.0/search).

      Steps to Reproduce

      1. Have one instance with Confluence and Jira Service Desk
      2. Create a Confluence space
      3. Enable Anonymous access in Space permissions and Global permissions
      4. Open an incognito window (or a private browsing window, depending on which browser you use) and access the space without logging-in. Run a search and see that everythig works as expected
      5. Now link the space to a Jira Service Desk project as explained in the Set Up a Knowledge Base documentation page
      6. Modify the search permissions for Jira Service Desk to enable view access for all users
      7. Check the Space overview and search in Livesearch, notice that there are results suggested
      8. Repeat step 4 (logout, use private/incognito window, or use a different browser to access the space and run a search)

      Expected Results

      Livesearch should suggest results for anonymous users as it happened in step #4

      Actual Results

      No suggested results are shown. In the browser developer tools it is seen that Livesearch is returning a 401 error.

      This is because after linking the space to a JSD project the username anonymous is added to the arguments passed to the REST API search endpoint and since there is no user having such username in the instance error 401 is returned:

      When the space is not linked to a JSD project the GET request is:

      https://troubleshootingcompany.atlassian.net/wiki/rest/searchv3/1.0/search?queryString=test&where=TS1&type=page&user=&pageSize=5&highlight=false&sessionUuid=0-0-0-0
      

      As you can see in the query string, no value is passed for the user property:

      queryString=test&where=TS1&type=page&user=&pageSize=5&highlight=false&sessionUuid=0-0-0-0
      

       

      When the space is linked to a JSD project the GET request is:

      Request URL: https://troubleshootingcompany.atlassian.net/wiki/rest/searchv3/1.0/search?queryString=test&where=TS1&type=page&user=anonymous&pageSize=5&highlight=false&sessionUuid=0-0-0-0
      

      As you can see in the query string, the user property is set to anonymous (user=anonymous):

      queryString=test&where=TS1&type=page&user=anonymous&pageSize=5&highlight=false&sessionUuid=0-0-0-0

       

      Notes

      The issue is not reproducible if the site doesn't have Jira Service desk enabled, in that case, the REST API value for the username is empty and the search works as expected

      Workaround

      No workaround available at the moment

        1. Screen Shot 2018-09-20 at 18.27.38.png
          Screen Shot 2018-09-20 at 18.27.38.png
          1002 kB
        2. Screen Shot 2018-09-20 at 18.25.14.png
          Screen Shot 2018-09-20 at 18.25.14.png
          782 kB
        3. image-2018-09-24-13-21-38-220.png
          image-2018-09-24-13-21-38-220.png
          482 kB
        4. image-2018-09-24-13-21-10-320.png
          image-2018-09-24-13-21-10-320.png
          482 kB
        5. image-2018-09-24-13-20-28-105.png
          image-2018-09-24-13-20-28-105.png
          485 kB
        6. image-2018-09-24-13-18-41-906.png
          image-2018-09-24-13-18-41-906.png
          684 kB
        7. image-2018-09-24-13-18-33-823.png
          image-2018-09-24-13-18-33-823.png
          684 kB
        8. image-2018-09-24-13-16-45-463.png
          image-2018-09-24-13-16-45-463.png
          667 kB
        9. image-2018-09-24-13-15-46-793.png
          image-2018-09-24-13-15-46-793.png
          667 kB
        10. image-2018-09-24-13-06-22-314.png
          image-2018-09-24-13-06-22-314.png
          485 kB
        11. image-2018-09-24-13-05-42-783.png
          image-2018-09-24-13-05-42-783.png
          500 kB

              Assignee:
              Unassigned
              Reporter:
              Ramona Scripcaru
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: