The OAuth Login and Approve has the wrong URL when using IIS as a proxy

Proxying Atlassian server applications with Microsoft Internet Information Services (IIS)

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

The content on this page relates to platforms which are not supported. Consequently, Atlassian Support cannot guarantee providing any support for it. Please be aware that this material is provided for your information only and using it is done so at your own risk.

Symptoms

The OAuth dance (Login and Approve) can redirect to the wrong URL. Some examples this has been reported:

  • In Jira's Development panel, when authenticating with Development Tools
  • When inserting Jira issue macros into Confluence
  • When working with third party tools that utilize OAuth and Application links

Diagnosis

Check the URLs that are producing errors. Key factors that can help you determine if you're running into this problem or not:

Does the context path match the destination URL?

For example, if you're linking a Confluence site at <mysite.com/wiki> to a Jira site at someothersite.com/jira, does Jira show /wiki in the URL (and produce a page not found)?

Does the Application Link ID in the URL match the destination application?

Check the application link ID in the URL of the malfunctioning URL - it should be different to the ID from the destination; which can be checked by browsing to <yoursite.com/rest/applinks/2.0/manifest.json> as an administrator.

Are you using IIS as your reverse proxy with Application Request Routing (ARR)?

This document only applies to IIS when ARR is in use.

Cause

This is caused by the "Reverse rewrite host in response headers" option being enabled in IIS.

tip/resting Created with Sketch.

This setting can be enabled at the site level, where it will affect only that site - but it can also be enabled at the machine level. Make sure to check both the site level configuration and the machine level configuration in IIS Manager.

Resolution

  • Disable the setting "Reverse rewrite host in response headers"

Last modified on Feb 5, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.