Welcome! Log In Create A New Profile

Advanced

auth_request off; ignored when combined with auth_basic;

Stian Øvrevåge
October 13, 2017 01:48AM
Hi list,

I have a server {} block that is protected with auth_request; on the top level.

auth_request is used for a interactive login process.

I have some endpoints that will receive data from other software, and
must instead be protected by auth_basic. However, "auth_request off;"
is ignored in these location{} blocks IF there is also a auth_basic
statement in the block.

This works without logging in:
location /test/ {
auth_request off;
proxy_pass http://localhost:88/;
}

This is automatically redirected back to /security/ for login (as
defined by auth_request in server{} block.
location /api/ {
auth_request "off";
auth_basic "Restricted access";
auth_basic_user_file /etc/htpasswd;
proxy_pass http://localhost:88/;
}

I see online references to a "satisfy any" directive that apparently
worked a few years ago, but it does not anymore, and others are
reporting similar problems:
https://stackoverflow.com/questions/42301559/nginx-with-auth-request-and-auth-basic

Brgds,
Stian Øvrevåge
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

auth_request off; ignored when combined with auth_basic;

Stian Øvrevåge October 13, 2017 01:48AM

Re: auth_request off; ignored when combined with auth_basic;

Maxim Dounin October 13, 2017 05:16AM

Re: auth_request off; ignored when combined with auth_basic;

Stian Øvrevåge October 13, 2017 12:16PM

Re: auth_request off; ignored when combined with auth_basic;

Stian Øvrevåge October 13, 2017 12:42PM

Re: auth_request off; ignored when combined with auth_basic;

Francis Daly October 13, 2017 06:14PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 148
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready