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

Allow authentication tokens to make it through nginx proxy #691

Closed
humphd opened this issue Feb 9, 2020 · 4 comments
Closed

Allow authentication tokens to make it through nginx proxy #691

humphd opened this issue Feb 9, 2020 · 4 comments
Assignees
Labels
area: deployment Production or Staging deployment area: web server Issues related to the web server type: bug Something isn't working type: security Security concerns

Comments

@humphd
Copy link
Contributor

humphd commented Feb 9, 2020

Our login on staging doesn't work correctly anymore:

Screen Shot 2020-02-09 at 11 23 42 AM

I think the issue here is that our HTTPS ngnix reverse proxy to the node app is not allowing authentication headers to pass through to the client.

I'm not 100% how to fix this. Some initial reading points at http://nginx.org/en/docs/http/ngx_http_auth_request_module.html and also these extra nginx config settings:

       proxy_pass_header  Authorization;
       proxy_set_header Authorization $http_authorization;
       proxy_pass_request_body off;
       proxy_set_header Content-Length "";
       proxy_set_header X-Original-URI $request_uri;

We might also need to do something in our node app to have it trust tokens that have come across from a proxy.

@humphd humphd added type: bug Something isn't working area: web server Issues related to the web server area: deployment Production or Staging deployment type: security Security concerns labels Feb 9, 2020
@c3ho
Copy link
Contributor

c3ho commented Feb 9, 2020

I’ll take this issue on, want to learn about this stuff.

@c3ho c3ho self-assigned this Feb 10, 2020
@humphd
Copy link
Contributor Author

humphd commented Feb 10, 2020

I ran into another issue with login today on HTTPS for staging. When I try to login, our express server is using a GET request to /auth/login/callback but it should be a POST.

You can try to Login on https://telescope-eq0rhvdfk.now.sh/ and after you do, you'll see that it gives a 404 while trying to GET /auth/login/callback. We have that, but it's POST.

@humphd
Copy link
Contributor Author

humphd commented Apr 12, 2020

@c3ho @manekenpix, have we covered all this? I think it's working well. Can we close this?

@humphd
Copy link
Contributor Author

humphd commented Apr 14, 2020

I'm going to close this until we hit a bug that relates to needing it.

@humphd humphd closed this as completed Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: deployment Production or Staging deployment area: web server Issues related to the web server type: bug Something isn't working type: security Security concerns
Projects
None yet
Development

No branches or pull requests

2 participants