Configuring Confluence to use JIRA user management - Error
Asked by Matthew Williams:

We have a JIRA and Confluence server installed on the same machine. For about a year we've used the internal user management systems for each. I would now like to transition to using the JIRA user management system for both.

I followed the instructions for [Connecting Confluence to Jira applications for User Management](https://confluence.atlassian.com/doc/connecting-to-crowd-or-jira-for-user-management-229838465.html)

However, I receive the following error after I click "Test Settings" in Confluence's Configure Atlassian JIRA Server. I made sure that the JIRA user server has an entry for Confluence, and I've tried both the local (127.0.0.1) and the public IP.
> Configure Atlassian JIRA Server - Confluence Connection test failed. Response from the server: com.atlassian.crowd.exception.ApplicationPermissionException: Forbidden (403) Encountered a "403 - Forbidden" error while loading this page. client.forbidden.exception Go to JIRA home

Searching for previous solutions brings me to [this page](https://confluence.atlassian.com/confkb/unable-to-connect-to-jira-for-authentication-forbidden-403-728139630.html).

I followed the instructions, except I don't understand "configure <http://127.0.0.1:port/context_path> on the "Server URL" settings." What is "context_path"?

I have tried using <http://127.0.0.1:8080/> and <http://127.0.0.1:8080/jira> but both return the following error:
> Configure Atlassian JIRA Server - Confluence Connection test failed. Response from the server: The following URL does not specify a valid Crowd User Management REST service: [http://127.0.0.1:8080/rest/usermanagement/1/search?entity-type=user\&start-index=0\&max-results=1\&expand=user](http://127.0.0.1:8080/rest/usermanagement/1/search?entity-type=user&start-index=0&max-results=1&expand=user)

I can provide screenshots if necessary.  

Thanks!


Answers:
author: Brant Schroeder
body: What is the path you use to access JIRA?

Are you using a proxy?

What is the OS of the server?

Are you running a firewall on the server?

comments: author: Matthew Williams
body: We have a URL mapped to the public IP of the server that JIRA \& Confluence are installed on. Is that what you mean by path used to access JIRA?

We are running Linux.

I'm not sure on the proxy and firewall questions. I've reached out to the person that runs the server to ask.


author: Brant Schroeder
body: Have you heard anything about firewall or proxy configurations?

Do you have an application link between Confluence and JIRA setup?


author: Matthew Williams
body: Sorry for the delay. I'm dealing with multiple time zones.

There is no proxy set up. We are using a firewall (iptables).


author: Brant Schroeder
body: Do you have an application link setup between confluence and jira?


author: Matthew Williams
body: Yes. In JIRA admin under User Management \> JIRA user server \> Add application I added confluence. For the IP addresses I tried the public IP address for the machine as well as 127.0.0.1


author: Brant Schroeder
body: Matthew,

Couple of things to check as this does not sound like a network/proxy/firewall issue.

1. Did you setup JIRA as a user server? Admin \> User Management \> JIRA user server. Documentation on how to configure - <https://confluence.atlassian.com/adminjiraserver079/connecting-to-crowd-or-another-jira-application-for-user-management-950288330.html>
2. Whitelist Confluence in JIRA - <https://confluence.atlassian.com/adminjiraserver070/configuring-the-whitelist-749383565.html>
3. Once you have configured JIRA as a user server and whitelisted Confluence you will need to follow the steps here to connect to JIRA <https://confluence.atlassian.com/conf68/connecting-to-crowd-or-jira-for-user-management-947170982.html>
4. If you still get the error you will need to reach out to your server admin and begin looking at logs and doing network traces to find out if something is blocking you on the network or if you have something miss-configured.

I am hoping that you just missed white listing your application or the JIRA user server is not configured correctly.


author: Matthew Williams
body: First, I want to thank you for working through this with me.

Second, I double checked, and all of the steps you suggested were done correctly.

Finally, I have actually gotten it to work, but the solution is incredibly confusing to me. The IP that I use when I set up the JIRA user server (Admin \> User Management \> JIRA user server) is the IP that we use to access JIRA and Confluence (mapped via a URL, of course). When I change the IP to X.X.X.\* then my error goes away. Why would this wildcard get rid of the 403 error message?


author: Brant Schroeder
body: Matthew,

I am not a routing expert but my guess it has something to do with how the request is being routed and by using the wildcard you are able to get through. You could run a trace and see.


author: Matthew Williams
body: I'll work with our server admin on the issue.

Let's go ahead and mark this issue as solved.

Thanks for all your help Brant!


author: jimmy elias ghostine
body: I'm running jira as cluster for 2 nodes.

I'm using the following config for jira user server.

I added the 2 IPs of the 2 server nodes (.4 - .5) as follows in the IP addresses section:

**::1**   
**172.29.1.5**   
**172.29.1.4**   
**127.0.0.1**

And also I can confirm that the url that I access confluence from is whitelisted (already done successfully the application link between jira and confluence).

But the following error persist while testing:

***Connection test failed. Response from the server:***   
***com.atlassian.crowd.exception.ApplicationPermissionException: Forbidden (403) Encountered a "403 - Forbidden" error while loading this page. client.forbidden.exception Go to Jira home***

Waiting for your kind response and help.

Thank you in advance.


author: Kim Tso
body: I have similar situation,

created link, two way between jira and confluence

In my case, both jira and confluence run behind nginx and ssl termination.


author: Vladimir Laskov
body: me too (  
any solutions?


Tags: confluence-server

server