3 ms·
That's cool, I've done pretty much the same thing for our internal services. I noticed you use the github org for oauth2proxy. In our setup, I wanted to add au
by zalmoxes 10y ago
That's cool, I've done pretty much the same thing for our internal services. I noticed you use the github org for oauth2proxy.
In our setup, I wanted to add authentication to a few dozen sub domains, but use a single oauth2proxy instance. Github Oauth makes this kind of gross, the callback must point to the same subdomain you're trying to authenticate. But it does allow something like /oauth2/callback/route.to.this.instead
In the end, to achieve what I wanted (a single oauth2proxy for multiple internal services) I had to
- fork oauth2proxy and make a few small changes to the redirect-url implementation
- create a small service with takes oauth.acme.co/oauth2/callback/subdomain.acme.co and redirects to subdomain.acme.co to comply with GitHub' oauth requirements
- created a small reverse proxy in Go which does something similar to nginx_auth_request. I had a few specific reasons to do this (like proxying websockets and supporting JWT directly)
https://gist.github.com/groob/ea563ea1f3092449cd75eeb78213cd83 https://gist.github.com/groob/ea563ea1f3092449cd75eeb78213cd...
I hope that someone ends up writing a k8s ingress controller specific to this use case.
- aledbf 10y agoPlease check https://github.com/kubernetes/ingress/pull/190 https://github.com/kubernetes/ingress/pull/190
- zalmoxes 10y agoVery nice! I remember talking with you regarding some of this in k8s slack when I was trying to figure out how to wire it all up. Thank you for all the work you do on the ingress project by the way.