You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.
I am attempting the method described in another issue response of...
nginx port 80/443 -> oauth2_proxy port 4180 -> nginx port 5180 -> various upstreams
https://my.internal.server/oauth2/callback should be handled by oauth2_proxy (and it's a necessary part of the oauth2 exchange), look in the oauth2_proxy logs to see what it says about it.
You can simplify your oauth2_proxy setup by not using https to connect to it. It's listening only on localhost and nginx is connecting directly to localhost so it's probably fine.
You can simplify your internal port-5180 nginx server block by listening only on localhost (127.0.0.1:5180), in which case it's probably safe to use plain http for that as well (instead of ssl/tls).
It's probably worth mentioning that you didn't include any proxy_pass statement in the nginx port-5180 server block you posted ... presumably your actual test config has it.
Finally, you shouldn't need the proxy_redirect line for oauth2_proxy. It should use the host header it got when constructing Location headers. (And whether you need the proxy_redirect line in the :5180 nginx server block is dependent on the application - if it's decently written, you don't, since you pass the original Host header all the way through.)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am attempting the method described in another issue response of...
nginx port 80/443 -> oauth2_proxy port 4180 -> nginx port 5180 -> various upstreams
I have the nginx listening on 443, and it passes to oauth2_proxy I authenticate and then hit a 404 error back from nginx. it looks like it's trying to get
https://my.internal.server/oauth2/callback?state=/&code=4/XXXXXXXXXXXX
instead of just hitting
https://my.internal.server
in my oauth_proxy config I have...
https_address = "127.0.0.1:4180
and
in my nginx conf I have...
and
any ideas?
The text was updated successfully, but these errors were encountered: