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

Redirected to /auth/unauthorized on first request after successful login. #25

Open
activeshadow opened this issue May 16, 2018 · 1 comment

Comments

@activeshadow
Copy link

I'm able to login successfully, as identified by a 200 response in the logs when POSTing to /api/v1.0/auth/login, but the next request to say, GET /pcapdb/, results in a 302 redirect to /auth/unauthorized?next=/pcapdb/. This happens with both in-app users and LDAP users. The logs don't show anything more than what I've mentioned above.

nginx_1       | 172.17.0.1 - - [15/May/2018:23:00:44 +0000] "POST /api/v1.0/auth/login HTTP/1.1" 200 23 "http://localhost:8090/auth/unauthorized?next=/pcapdb/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" "-"
pcapdb-head_1 | [pid: 20|app: 0|req: 11/18] 172.17.0.1 () {50 vars in 957 bytes} [Tue May 15 23:00:44 2018] POST /api/v1.0/auth/login => generated 13 bytes in 91 msecs (HTTP/1.1 200) 8 headers in 406 bytes (1 switches on core 0)
nginx_1       | 172.17.0.1 - - [15/May/2018:23:00:44 +0000] "GET /pcapdb/ HTTP/1.1" 302 5 "http://localhost:8090/auth/unauthorized?next=/pcapdb/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" "-"
pcapdb-head_1 | [pid: 19|app: 0|req: 5/19] 172.17.0.1 () {44 vars in 830 bytes} [Tue May 15 23:00:44 2018] GET /pcapdb/ => generated 0 bytes in 1 msecs (HTTP/1.1 302) 6 headers in 215 bytes (1 switches on core 0)
nginx_1       | 172.17.0.1 - - [15/May/2018:23:00:44 +0000] "GET /auth/unauthorized?next=/pcapdb/ HTTP/1.1" 200 10062 "http://localhost:8090/auth/unauthorized?next=/pcapdb/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" "-"
pcapdb-head_1 | [pid: 20|app: 0|req: 12/20] 172.17.0.1 () {44 vars in 877 bytes} [Tue May 15 23:00:44 2018] GET /auth/unauthorized?next=/pcapdb/ => generated 10035 bytes in 10 msecs (HTTP/1.1 200) 6 headers in 304 bytes (1 switches on core 0)

I've made a few minor changes to be able to split all the services into their own Docker containers (for example, so pcapdb, postgres, rabbitmq, and nginx don't all run in the same container), but I haven't touched any auth-related code so I wouldn't think those changes would be causing this.

@nealey
Copy link
Member

nealey commented Jun 11, 2018

I'm not familiar enough with the internals of pcapdb to know what might be causing this, but would you mind forking the code and checking your changes in so that others might benefit from your docker work?

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