JIRA issue collector https

Kasper Bakmann February 3, 2016

We have changed our JIRA server to run behind a nginx that strips https, and send the request to JIRA via http. And we also changed the JIRA base URL to https://.

An error occurs when calling the issue collector:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('http://jira.ourserver.com') does not match the recipient window's origin ('https://jira.ourserver.com').

When the baseURL is changed to https:// i would suppose that it would be changed in the javascript requested by the jQuery.ajax call.

How can we fix this issue?

 

5 answers

1 accepted

0 votes
Answer accepted
viktorokolot
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 3, 2016

Hi @Kasper Bakmann
specify you in server.xml options scheme/proxyName/proxyPort?

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 3, 2016

Exactly, in 

<Connector

of your server.xml (Apache tomcat under config dir)

Add

proxyName="jira.ourserver.com"  proxyPort="443" scheme="https" secure="true" 

Kasper Bakmann February 3, 2016

@Viktor Okolot [Polontech] @Sash [ConfiForms] I have updated the description of the problem. We do not use a certificate on our JIRA server. Sorry for misinforming you .. And thanks for the kind replies.

0 votes
Kasper Bakmann February 3, 2016

@Viktor Okolot [Polontech] + @Sash [ConfiForms] + @Steven Behnke .. Changing the Connector with proxyPort and proxyName did the trick as you adviced me to do. Thank you guys!

0 votes
Steven F Behnke
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 3, 2016

I see. I read your Question more closely.

  • External traffic navigates to NGINX
  • NGINX terminates SSL and proxies JIRA

Viktor and Sash are both correct, you need to inform Tomcat that it is being proxied to an SSL connection on port 443 (https). Please do follow their directions about modifying the server.xml file.

Secondly, you could also try entering the reference to JIRA in your script so it looks like so – //jira.ourserver.com/. Notice the lack of 'http:' or 'https:'. Not sure if that will help your proxy issue though.

0 votes
Kasper Bakmann February 3, 2016

Hi @Steven Behnke 

Thanks for your quick reply.

We call the script via jQuery.ajax and the url looks like this:

https://jira.ourserver.com/s/7104f7a36d38bc662345373183b87543-T/da_DKbxlvll/6332/3/1.4.15/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs.js?locale=da-DK&collectorId=e2592a74

I can not see that should cause any problems - do you?

I have tried to recreate the issue collector and the script created by JIRA suggests using http://jira... not https:// .. hmm that seems strange, is there another base url we should set?

0 votes
Steven F Behnke
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 3, 2016

I am not certain of the strategy to accomplish this. Did you check the javascript file you're downloading inline? The script references HTTP and HTTPS and it looks like this – 

&lt;script type="text/javascript" src="https://jira.domain.com/s/79b3b8767086874764c0e633d4d3f1c2-T/en_USxto4uu/64019/67/1.4.25/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&amp;collectorId=3a44c071"&gt;&lt;/script&gt;

 

Perhaps you just need to delete and recreate the issue-collector?

Suggest an answer

Log in or Sign up to answer