-
Type:
Bug
-
Resolution: Not a bug
-
Priority:
Low
-
None
-
Affects Version/s: 7.13.3, 7.13.4
-
Component/s: Macros - Gadgets
-
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
- Install Confluence with two Connectors
- Proxy connector
- 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
- Install Jira with two Connectors
- Proxy connector
- 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="[]|{}^\`"<>" />
Configure
- 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
- 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
- Add the gadget to a page on Confluence
Expected Results
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
- Edit the application and set the Application URL and Display URL to match the base URL of Jira
- Go to Cog --> General Configuration --> Cache Management and click on Flush All (optional)
Notes
- The issue isn't present in Confluence 7.4.9