Stash Application Link creation does not use https

When creating an application link from stash to jira, and both services running with on https with nginx as reverse proxy during the creation process a plain http link is generated for stash: 

Url Pattern: http://stash.domain.tld/rest/applinks/2.0/applicationlink/[....]

 

Background:

I have a nginx reverse proxy with TLS set up according to the nginx-proxy-ssl tutorial, for jira, confluence and stash.

I use a self signed certificate and the signing certificate has been added sucessfully to the systems trust store.

I was able to create an application link from JIRA to confluence and visa versa, whichout any issue.

Alle three applications completly run over https, without any problems ( no mixed content and so on ).

 

My Problem occours when i try to setup the link from stash to JIRA ( the other way around works without any issue ).

//edit:

One more note: before switching to https, creating the link was possible, so there should not be any general network issue in that direction.

//

 

Some details:

 

When i create the application link the following happens:

PUT: https ://stash.me/rest/applinks/2.0/applicationlink

is called which is correct, but returns:

 

{"status-code":201,"resources-created":[{"href": http:// stash.me/rest/applinks/2.0/applicationlink/xxx-uuid-xxx",
"rel":"self"}]

 

 

It appears the within the authentication communication the wrong scheme is returned.

Thus the browser will try an http and not https request, which is invalid and will not work (no http setup and chrome blocks the request anyway )

 

Here are the settings of nginx and the stash connector:

 

proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Proto $scheme; # also tried https, same result
    proxy_set_header X-Forwarded-Server $host;

 

 

<Connector port="7990" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   useBodyEncodingForURI="true"
                   redirectPort="443"
                   proxyPort="443"
                   proxyName="code.mydomain.tld"  
                   scheme="https"
                   secure="true"
                   compression="on"
compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript" />

 

 

2 answers

This widget could not be displayed.

Hi Dennis,

Can you confirm you've changed Stash's Base URL to reflect the HTTPS URL in Stash Administration > Server settings?

Regards,

Gustavo Refosco

This widget could not be displayed.

Dear Gustavo, 

yes I can confirm that. 

JIRA and Stash have a https base url configured.

regards

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Friday in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

169 views 9 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you