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

/auth returning 200, but looping back to /login #92

Open
rsulliv1 opened this issue Dec 28, 2021 · 0 comments
Open

/auth returning 200, but looping back to /login #92

rsulliv1 opened this issue Dec 28, 2021 · 0 comments

Comments

@rsulliv1
Copy link

rsulliv1 commented Dec 28, 2021

From what i'm seeing, my protected resource is correctly redirecting to the login form, but i'm not sure why i can't seem to get the resource to register the 200 /auth response:

172.18.0.1 - usrname [28/Dec/2021 04:57:31] "GET /auth HTTP/1.0" 200 -
172.18.0.1 - - [28/Dec/2021 05:22:36] using username/password from cookie nginxauth
172.18.0.1 - - [28/Dec/2021 05:22:36] Trying to dechipher credentials...
172.18.0.1 - usrname [28/Dec/2021 05:22:36] searching on server "ldap://192.168.1.1:389" with base dn "ou=users,dc=company,dc=net" with filter "(cn=usrname)"
172.18.0.1 - usrname [28/Dec/2021 05:22:36] Auth OK for user "usrname"
172.18.0.1 - usrname [28/Dec/2021 05:22:36] "GET /auth HTTP/1.0" 200 -
172.18.0.1 - - [28/Dec/2021 05:22:36] using username/password from cookie nginxauth
172.18.0.1 - - [28/Dec/2021 05:22:36] Trying to dechipher credentials...
172.18.0.1 - usrname [28/Dec/2021 05:22:36] searching on server "ldap://192.168.1.1:389" with base dn "ou=users,dc=company,dc=net" with filter "(cn=usrname)"
172.18.0.1 - usrname [28/Dec/2021 05:22:36] Auth OK for user "usrname"
172.18.0.1 - usrname [28/Dec/2021 05:22:36] "GET /auth HTTP/1.0" 200 -
172.18.0.1 - - [28/Dec/2021 05:22:38] using username/password from cookie nginxauth
172.18.0.1 - - [28/Dec/2021 05:22:38] Trying to dechipher credentials...
172.18.0.1 - usrname [28/Dec/2021 05:22:38] searching on server "ldap://192.168.1.1:389" with base dn "ou=users,dc=company,dc=net" with filter "(cn=usrname)"
172.18.0.1 - usrname [28/Dec/2021 05:22:38] Auth OK for user "usrname"
172.18.0.1 - usrname [28/Dec/2021 05:22:38] "GET /auth HTTP/1.0" 200 -
172.18.0.1 - - [28/Dec/2021 05:22:39] using username/password from cookie nginxauth
172.18.0.1 - - [28/Dec/2021 05:22:39] Trying to dechipher credentials...
172.18.0.1 - usrname [28/Dec/2021 05:22:39] searching on server "ldap://192.168.1.1:389" with base dn "ou=users,dc=company,dc=net" with filter "(cn=usrname)"
172.18.0.1 - usrname [28/Dec/2021 05:22:39] Auth OK for user "usrname"
172.18.0.1 - usrname [28/Dec/2021 05:22:39] "GET /auth HTTP/1.0" 200 -
172.18.0.1 - - [28/Dec/2021 05:22:39] using username/password from cookie nginxauth
172.18.0.1 - - [28/Dec/2021 05:22:39] Trying to dechipher credentials...
172.18.0.1 - usrname [28/Dec/2021 05:22:39] searching on server "ldap://192.168.1.1:389" with base dn "ou=users,dc=company,dc=net" with filter "(cn=usrname)"
172.18.0.1 - usrname [28/Dec/2021 05:22:39] Auth OK for user "usrname"
172.18.0.1 - usrname [28/Dec/2021 05:22:39] "GET /auth HTTP/1.0" 200 -
172.18.0.1 - - [28/Dec/2021 05:22:39] using username/password from cookie nginxauth
172.18.0.1 - - [28/Dec/2021 05:22:39] Trying to dechipher credentials...
172.18.0.1 - usrname [28/Dec/2021 05:22:39] searching on server "ldap://192.168.1.1:389" with base dn "ou=users,dc=company,dc=net" with filter "(cn=usrname)"
172.18.0.1 - usrname [28/Dec/2021 05:22:39] Auth OK for user "usrname"
172.18.0.1 - usrname [28/Dec/2021 05:22:39] "GET /auth HTTP/1.0" 200 -

from that GET response in the log, i'm thinking that the following should catch that 200 and allow the access to proceed to the resource:

auth_request /auth;
error_page 401 = /login;

The first oddity that jumps out is that it seems like there are a number of requests going through with the same timestamp; I wouldn't expect multiple calls over the same second.

The experience is that if you try to access the protected resource, you're redirected to the login form. then, upon submitting, i'm dropped back onto the login form.

I get the exact same form, without error or help message, regardless of correct credentials, invalid username, or invalid password.


I can use the test page successfully:
accessing http://dns:9000/auth
returns:
Hello, world! Requested URL: /auth

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

1 participant