http digest + proxy doesn't work on /something?x=3?

Francis Daly francis at daoine.org
Tue Sep 29 20:01:55 UTC 2015


On Mon, Sep 28, 2015 at 04:24:21PM +0200, Jacek Wielemborek wrote:

Hi there,

> I have a question
> regarding HTTP digest nginx module in combination with proxy_pass. I
> tried the attached configuration file in combination with nginx-1.6.3
> and kept getting asked for password infinitely when I try to accept any
> resource other than /. How can this problem be solved?

There's only one nginx-1.6.3.

There's not only one HTTP digest nginx module.

Which specific module are you using?

I tried testing with the one from
https://github.com/samizdatco/nginx-http-auth-digest/archive/master.zip,
which is linked from https://github.com/samizdatco/nginx-http-auth-digest

I found that "/" failed, but "/index.html" succeeded.

"/file.html" succeeded with and without proxy_pass.

"/file.html?k=v" failed with and without proxy_pass.

My "digest" file has the contents

a:Realm:ec0b1e4f2b9976181ef458cd8e14e735

which (hopefully) corresponds to user=a, password=a


I guess that the module version I used and the version of nginx I used
may have some important differences. Or maybe my client implements the
digest authentication calculation in a different way to what this module
does; presumably not both of them are correct, if that is the case.

So, in your case:

* what module do you use?
* what digest file do you test with (make any one that you are happy to
share, like the above one)
* what requests do "work", and what do not?
* does proxy_pass make a difference in whether it works? (if not,
simplify your config)
* does your port-8000 upstream server do its own authentication?

Those details might allow someone else to more fully investigate.

Good luck with it,

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list