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

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

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
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

2,363 views 9 12
Read article

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