External Gadgets connection breaks when the Application and Display URLs are different

XMLWordPrintable

    • 30
    • Severity 2 - Major
    • 12
    • CtB - Improve Existing

      Problem

      Jira external gadgets URL breaks in Confluence 7.13.4 when the Jira application link has different URLs configured in Application and Display URL
       

      Environment

      Jira 8.20
      Confluence 7.13.4

      Steps to Reproduce

      Setup Confluence

      1. Install Confluence with two Connectors
        1. Proxy connector
        2. Unproxied connector
          • <Connector port="8090" address="127.0.0.1" connectionTimeout="20000"
            		maxThreads="200" minSpareThreads="10"
            		enableLookups="false" acceptCount="10" URIEncoding="UTF-8"
            	/>
            

      Setup Jira

      1. Install Jira with two Connectors
        1. Proxy connector
        2. Unproxied connector
          • <Connector port="8080" address="127.0.0.1" connectionTimeout="20000"
                  		maxThreads="200" minSpareThreads="10"
                  		enableLookups="false" acceptCount="10" URIEncoding="UTF-8"
                		relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"
            	/>
            

      Configure

      1. Create Application Link between Confluence and Jira
        • Use http://localhost:8080/jira instead of http://<domain>/jira
        • Create an application where the Application URL and Display URL are different
      2. Grab the XML link of a gadget from Jira and add it in Confluence under External Gadgets
        • e.g. http://<domain>.com/jira/rest/gadgets/1.0/g/com.atlassian.jira.gadgets:two-dimensional-stats-gadget/gadgets/two-dimensional-stats-gadget.xml
      3. Add the gadget to a page on Confluence

      Expected Results

      The page to load as expected

      Actual Results

      Confluence is unable to retrieve the gadget specs

      2022-02-08 10:11:08,417 WARN [AtlassianEvent::CustomizableThreadFactory-5] [renderer.internal.http.HttpClientFetcher] fetch A request to http://<domain>.com/jira/rest/gadgets/1.0/g/com.atlassian.jira.gadgets:two-dimensional-stats-gadget/gadgets/two-dimensional-stats-gadget.xml has been denied. To allow requests to this URL add the application URL to your whitelist (http://confluence.atlassian.com/x/KQfCDQ).
      2022-02-08 10:11:08,418 WARN [AtlassianEvent::CustomizableThreadFactory-5] [gadgets.renderer.internal.GadgetSpecFactoryImpl] getGadgetSpec Error occurred while retrieving gadget spec for http://<domain>.com/jira/rest/gadgets/1.0/g/com.atlassian.jira.gadgets:two-dimensional-stats-gadget/gadgets/two-dimensional-stats-gadget.xml
      2022-02-08 10:11:08,419 WARN [AtlassianEvent::CustomizableThreadFactory-5] [plugins.gadgets.metadata.GadgetsMacroMetadataProvider] generateMacroMetadata Unable to parse gadget spec [ http://<domain>.com/jira/rest/gadgets/1.0/g/com.atlassian.jira.gadgets:two-dimensional-stats-gadget/gadgets/two-dimensional-stats-gadget.xml ]: org.apache.shindig.gadgets.GadgetException: Unable to retrieve gadget xml. HTTP error 403
      

      Workaround

      1. Edit the application and set the Application URL and Display URL to match the base URL of Jira
      2. Go to Cog --> General Configuration --> Cache Management and click on Flush All (optional)

      Notes

      • The issue isn't present in Confluence 7.4.9

        1. Screenshot 2022-02-08 at 09.48.46.png
          131 kB
          Puventhira Mannen Pragasam Selladurai
        2. Screenshot 2022-02-08 at 09.53.11.png
          76 kB
          Puventhira Mannen Pragasam Selladurai
        3. Screenshot 2022-02-08 at 10.13.42.png
          129 kB
          Puventhira Mannen Pragasam Selladurai
        4. Screenshot 2022-02-08 at 10.18.15.png
          177 kB
          Puventhira Mannen Pragasam Selladurai

            Assignee:
            Manonmani Muthukrishnan
            Reporter:
            Puventhira Mannen Pragasam Selladurai
            Votes:
            9 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: