Welcome! Log In Create A New Profile

Advanced

Re: How to configure Auth digest behind a proxy

Maxim Dounin
January 03, 2021 05:32PM
Hello!

On Sat, Jan 02, 2021 at 01:13:59AM +0000, kev jr wrote:

> Hello and happy new year
>
> I try to implement digest authentication on Nginx.
>
> The architecture is the following :
> Server A is the client
> Server B is the proxy (a API solution which only transmits the request as a proxy)
> Server C is my Nginx server where I configure the Digest authentification
>
> I have the following error, when my client try to connect to my Nginx through the proxy :
> uri mismatch - <proxyuri> does not match request-uri <nginxuri>
>
> because the client (server A) send the following parameter for the authentication
> Digest username="client", realm="Test", nonce="xxxxxx", uri="proxyuri", cnonce="xxxx=", nc=xxxx, qop=auth, response="xxx", algorithm=MD5\r\n
>
> The client (server A) send the proxyuri, and the Nginx server (server C) waiting for the nginxuri.
>
> Do you know which parameter, I need to add in my Nginx configuration to perform the connection ?
> Or Do you know, if it's possible to implement Digest authentication on Nginx behind a proxy ?
>
> For your information, the direct connection Client to Nginx server with Digest authentication works fine.

nginx itself does not support Digest authentication, only Basic one
(http://nginx.org/r/auth_basic).

If you are using some 3rd party module to implement Digest
authentication, you may want to refer to this module docs (or
sources) to find out how to properly use it behind a proxy.

Alternatively, consider switching to Basic authentication instead,
which is natively supported and, for obvious reasons, does not
have problems with proxying.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to configure Auth digest behind a proxy

kev jr January 01, 2021 08:16PM

Re: How to configure Auth digest behind a proxy

Maxim Dounin January 03, 2021 05:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 323
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready