Cannot create an OAuth Application Link with either Confluence or Stash. What could be causing Outgoing Authentication to always displays error?

Martyn Swanick March 25, 2014

We have a JIRA installation that our Confluence and Stash installations use as their User Directory. I have easily setup a 2-way Trusted Application link to both from JIRA, but when I try to enable OAuth for either within the Outgoing Authentication/Oauth area I just see the message:

An Application Link from the remote application to this application is required to configure this authentication provider.

But I can see the Application Links in all 3 installations. Any ideas what could cause this message? The message originates in the 400 response to the following URL that viewing the tab requests: http://JIRADOMAIN/plugins/servlet/applinks/auth/conf/oauth/add-consumer-by-url/57f0794e-069a-37f9-****-2f8f931327e6?uiposition=remote&hostUrl=http%3A%2F%2FJIRADOMAIN&outgoing2LOEnabled=true

All 3 installations are behind a reverse proxy, unsure if that migth have something to do with it?

Was looking forward to using the JIRA/Stash integration most of all but only parts seems to work without the OAuth setup being complete.

Thanks in adavance

4 answers

0 votes
Spencer Young March 14, 2017

Ran into this same problem today. The root cause for us ended up being a configuration of ARR in IIS. To resolve the problem, we had to go to Server -> ARR -> Proxy settings then uncheck the box that says reverse rewrite host in response headers

Ultimately, this had to be done both on the local and remote Atlassian applications.

0 votes
Astute Admin September 8, 2016

I ran into a similar problem running behind an HTTP proxy.  I ended up modifying the URL you linked above and loading it in my browser to make it work.

First thing I did was change the UUID listed in the URL (your example starts with 57f07...).  If you log into JIRA and view your application link, you should see a UUID at the end of the URL.  The ID in the URL in JIRA did not match the UUID I had from Bamboo.  Changing the UUID got rid of the error message, but didn't let me enable 2-legged OAuth.  In order to do that, I changed the parameter "uiposition=remote" to "uiposition=local".  That allowed me to enable 2-legged OAuth and finish the application link.

So, in summary, go to JIRA and edit the Application Link that is failing.  Grab the UUID at the end of the URL (after "plugins/servlet/applinks/edit/") and copy that UUID into the URL that threw the 400 error.  Then replace "uiposition=remote" with "uiposition=local".  Go to that URL in your browser and you should be able to enable OAuth.

 

Hope that works for you!

0 votes
Martyn Swanick April 22, 2014

Unfortunately not. After involving support we still couldn't get to the bottom of it.

Eventually removed the reverse proxy and ended up just using the host name with port, seemed like the best compromise and OAuth worked fine after that.

Keiran Beath April 23, 2014

Thanks Martyn - sadly my support request appears to have gone the same way (them basically saying they cannot help with any IIS related) - i'm not entirely sure what do as removing IIS from the equation is not a possibility for us

0 votes
Keiran Beath April 16, 2014

Having the same problem - keen to know if you find a solution!

Suggest an answer

Log in or Sign up to answer