Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$remote_user not set during authenticated request #22

Open
tmcclure opened this issue Jul 15, 2013 · 1 comment
Open

$remote_user not set during authenticated request #22

tmcclure opened this issue Jul 15, 2013 · 1 comment

Comments

@tmcclure
Copy link

In order to pass the username along to a fastcgi application (trac), I had to set a value for remote user explicitly like so as a workaround:

if ($http_authorization ~ username="([^\"]+)") {
    set $htdigest_user $1;
}
fastcgi_param  AUTH_USER          $htdigest_user;
fastcgi_param  REMOTE_USER        $htdigest_user;

Would be better if $remote_user was already set up correctly like it is with auth_basic.

@erikdubbelboer
Copy link
Collaborator

As you can see in the function that calculates $remote_user ngx_http_variable_remote_user() it uses ngx_http_auth_basic_user() which is a core function which parses the authentication header but only supports Basic. A patch to nginx is required. I'll see what I can do when I have some time but I guess it will also take some time to be put in an nginx release.

erikdubbelboer added a commit to atomx/nginx-http-auth-digest that referenced this issue Aug 16, 2015
erikdubbelboer added a commit to atomx/nginx-http-auth-digest that referenced this issue Aug 16, 2015
erikdubbelboer added a commit to atomx/nginx-http-auth-digest that referenced this issue Aug 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants