bringhurst / nginx-mod-auth-kerb

An nginx module to enable the use of SPNEGO, GSSAPI, and Kerberos for HTTP SSO authentication.
Other
37 stars 8 forks source link

Support REMOTE_USER enviroment variable with original domain username #2

Open petRUShka opened 12 years ago

petRUShka commented 12 years ago

There should be REMOTE_USER enviroment variable following the original CGI standard.

In this case domain username can be accesable by _SERVER['REMOTE_USER'] in PHP or request.env['REMOTE_USER'] in Ruby on Rails.

It is very important part of SSO-based authentication.

For example mod_spnego and mod_auth_kerb for Apache2 do it.

bringhurst commented 12 years ago

Agreed. This would be an extremely useful feature.

claptimes5 commented 11 years ago

Though I'm a year late, you can add

proxy_set_header REMOTE_USER $remote_user;

in your nginx config file to setup the request.env['HTTP_REMOTE_USER] variable.

dolohow commented 8 years ago

Or if you're using uwsgi you can add to uwsgi_params file the following line

uwsgi_param  REMOTE_USER        $remote_user;