Welcome! Log In Create A New Profile

Advanced

Nginx as reverse proxy to Hudson-Logout issue.

September 01, 2010 01:45AM
Hello list,

I have configured nginx as a reverse proxy to our hudson build server as follows:

[b]server {
listen 80;
server_name koala.proxy.internal;


location /hudson/ {
proxy_pass http://build.example.com/hudson/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header Host $http_host;
proxy_redirect off;
}[/b]

The backend hudson server is configured to authenticate users with Active Directory using
the hudson active directory plugin.

Everything works fine, except that when I click the logout button, nothing happens, and
I am still logged in, wheras the expected behaviour is, I should be logged out and taken
to the login page.

The request and response headers in firebug show these:

Response:

[b]HTTP/1.1 302 Moved Temporarily
Server: nginx
Date: Wed, 01 Sep 2010 02:40:57 GMT
Connection: keep-alive
Set-Cookie: ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE=""; Path=/hudson
Location: http://koala.proxy.internal/hudson/
Content-Length: 0
Expires: Thu, 02 Sep 2010 02:40:57 GMT
Cache-Control: max-age=86400[/b]

Request:

[b]GET /hudson/logout HTTP/1.1
Host: koala.proxy.internal
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://koala.proxy.internal/hudson/people/
Cookie: screenResolution=1280x720; JSESSIONID=8957FA425BC89DE784266DAACAD45135[/b]


Below are the headers from the hudson server, when I access it directly and click the logout
button:

Response:

[b]HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Expires: 0
Content-Type: text/html;charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 01 Sep 2010 05:00:33 GMT[/b]


Request:

[b]GET /hudson/login?from=%2Fhudson%2F HTTP/1.1
Host: build.example.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://build.example.com/hudson/
Cookie: screenResolution=1280x720; JSESSIONID=105C0A7031B817E0321336310FC8D6E1[/b]

As I understand from the headers,when I click logout, the GET request should be for "/hudson/login?from=%2Fhudson%2F"
and not for "/hudson/logout" as is happening through the reverse proxy.

I have tried many things to get it working but to no avail.Would really appreciate if someone
could guide me here.

Thanks,
Mogaroy
Subject Author Posted

Nginx as reverse proxy to Hudson-Logout issue.

mogaroy September 01, 2010 01:45AM

Re: Nginx as reverse proxy to Hudson-Logout issue.

mogaroy September 07, 2010 01:54AM

Re: Nginx as reverse proxy to Hudson-Logout issue.

Igor Sysoev September 07, 2010 02:04AM

Re: Nginx as reverse proxy to Hudson-Logout issue.

mogaroy September 07, 2010 02:40AM

Re: Nginx as reverse proxy to Hudson-Logout issue.

mogaroy September 07, 2010 03:54AM

Re: Nginx as reverse proxy to Hudson-Logout issue.

Igor Sysoev September 07, 2010 04:26AM

Re: Nginx as reverse proxy to Hudson-Logout issue.

Igor Sysoev September 07, 2010 04:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 64
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready