Hi All,
I am running a rails application in my laptop which is connected to the corporate intranet. I am using Apache 2.2.4 with Mongrel proxying. I want to authenticate the corporate intranet users using Windows Authentication. This is working fine with mod_sspi but I cant retrieve the username in rails. Its not available in REMOTE_USER or X_FORWARDED_USER. I have used the rewrite rule to add this information in the request header but with no success. When I set the request header like this for testing purpose, RequestHeader add X-FORWARDED-User "testuser"
its working fine and I can see the username but when I use this rewrite rule RewriteEngine On RewriteCond %{LA-U:REMOTE_USER} (.+) RewriteRule . -[E=RU:%1] RequestHeader add X-FORWARDED-User %{RU}e all I get in HTTP_X_FORWARDED_USER is (null). I know this issue has been discussed a lot and I can see people saying its working for them but I cant get this working. My Apache configuration for proxying is:-