Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Problems with Crowd token validation when Confluence is sitting behind an Apache proxy.

Lars Kellogg-Stedman March 30, 2012

We have Confluence sitting behind an Apache proxy running on the same host:

<Location / >
        ProxyPass          http://127.0.0.1:8080/
        ProxyPassReverse   http://127.0.0.1:8080/
</Location>

When Confluence attempts to validate a Crowd SSO token, it sets the remote-address validation-factor to "127.0.0.1", like this:

<validation-factors>
    <validation-factor>
        <name>remote_address</name>
        <value>127.0.0.1</value>
    </validation-factor>
    <validation-factor>
        <name>X-Forwarded-For</name>
        <value>96.1.2.3, 96.1.2.3</value>
    </validation-factor>
</validation-factors>

Here, the actual remote client is 96.1.2.3. The client connects to Crowd and to Confluence through a front-end proxy; the request arriving at Crowd has these headers:

X-Forwarded-For: 10.243.22.47, 10.243.21.54

Where 10.243.22.47 is the address of the Confluence host. The requests received by Apache on the Confluence host look like this:

X-Forwarded-For: 96.1.2.3

And when the request gets received by Tomcat, it looks like this:

X-Forwarded-For: 96.1.2.3, 96.1.2.3

Is there any way to get this to work? If I understand how things are working (and I may not!), Crowd and Confluence can only do SSO successfully if Confluence is receiving requests directly from clients -- i.e., with no intervening proxies. Is there any way to get Confluence to use the correct remote-address?

3 answers

0 votes
Harry Chan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2012

Hi, what list of ips do you have on Crowd's listed of authentication interfaces for the application Confluence? Have you added 127.0.0.1 and the other localhost options?

0 votes
Systems Department September 19, 2012

Did you ever figure out a solution to this issue? We are facing a similar problem to you and have reached a standstill in solving it.

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 30, 2012
Lars Kellogg-Stedman March 30, 2012

I have. You'll note that Confluence is able to authenticate to Crowd despite talking through a proxy; the problem here is that Confluence is providing bad information to Crowd, so no amount of trust is going to solve it. If there were something in Confluence analagous to "trusted proxies" so that Confluence would get the remote-address value from the X-Forwarded-For header that would solve our problem.

Lars Kellogg-Stedman March 30, 2012

To elaborated a bit: we have configured trusted proxies in Crowd, and the validation request is being passwd to the Crowd server by Confluence via one of our trusted proxies.

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 30, 2012

This page has hepled me in the past: http://confluence.atlassian.com/display/CROWD/Debugging+SSO+in+environments+with+Proxy+Servers

You can find the remote ips using this method.Ignore if you have tried this as well ;)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events