nginx-mod-auth-kerb icon indicating copy to clipboard operation
nginx-mod-auth-kerb copied to clipboard

Support REMOTE_USER enviroment variable with original domain username

Open petRUShka opened this issue 13 years ago • 3 comments

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.

petRUShka avatar Feb 02 '12 15:02 petRUShka

Agreed. This would be an extremely useful feature.

bringhurst avatar Feb 07 '12 16:02 bringhurst

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.

claptimes5 avatar May 10 '13 13:05 claptimes5

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

uwsgi_param  REMOTE_USER        $remote_user;

dolohow avatar Apr 06 '16 12:04 dolohow