OAuth: nginx proxy to link confluence with jira

Hello,

 

trying to clear out the following error when linking jira and confluence:

/rest/applinks/3.0/status/71b63d68-c19a-3ae4-8b5f-29ec14ddfd94 [c.a.a.i.migration.remote.TryWithCredentials] You do not have an authorized access token for the remote resource

 

The network error prevents both jira and confluence working together, but then my proxy works fin for a separate access:

 

jira. conf ->

server {
    listen 10.0.1.250:80;
    server_name jira.example.net;
    location / {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://10.0.2.70:8080;
    client_max_body_size 100M;
    }
}

 

confluence.conf ->

server {
    listen 10.0.1.249:80;
    server_name confluence.example.net;
    location / {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://10.0.2.80:8090;
    client_max_body_size 100M;
    }
    location /synchrony {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://10.0.2.80:8091/synchrony;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    }
}

 

 

 

 

1 answer

This widget could not be displayed.

Hi,

  • When you say they do not work together what do you mean by that?

I believe your issue is addressed in Unable to Search or View JIRA and Confluence links due to "RequestHeader unset Authorization."  While you appear to be using different subdomains, the domain is the same:

  •     server_name jira.example.net;
  •     server_name confluence.example.net;

The article I mentioned above lists the following symptoms:

From JIRA:

  • Can't search for Confluence pages to link to JIRA issues
  • Existing links show: "You do not have permission to view this page"

From Confluence:

  • Can't search for JIRA issues to include in Confluence pages
  • Existing links show: "JIRA issue doesn't exist or you don't have permission to view it"

The following appears in the atlassian-jira.log:

2017-02-24 21:54:23,826 http-nio-2786-exec-3 WARN admin 1314x277x2 rf4lxg 192.168.1.100,192.168.1.100 /rest/applinks/3.0/status/e87b0b73-eaa1-3493-bc27-a5bd27a7de29 [c.a.a.i.migration.remote.TryWithCredentials] You do not have an authorized access token for the remote resource.

The following appears in the atlassian-confluence.log:

2017-02-24 21:53:51,093 WARN [http-nio-2782-exec-2] [internal.migration.remote.TryWithCredentials] execute You do not have an authorized access token for the remote resource.
 -- referer: http://andynguyen.vn/cfl/admin/listapplicationlinks.action | url: /cfl/rest/applinks/3.0/status/b2693708-529b-3dda-804b-9c1a6d3e78e5 | traceId: a41148e6656babee | userName: admin

The article lists the cause as follows:

The VirtualHost for the domain in the proxy config contains this parameter: RequestHeader unset Authorization.

(warning) If JIRA and Confluence use different domains (different VirtualHosts), the parameter doesn't take effect and the problem doesn't happen.

To resolve the issue it is recommended to remove the parameter RequestHeader unset Authorization from the VirtualHost config and restart the proxy.

Try that and let me know if it helps!

Cheers,

Branden

Hello Branden,

 

thanks for your feedback.

Indeed jira/confluence are subdomains , then adding following vhost directives in nginx:

server {

    #proxy_hide_header Authorization;
     proxy_set_header   Authorization "";

...

}

in jira.conf and confluence.conf, did not resolve the issue.

 

Is there something wrong

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

533 views 7 6
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