-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Is it possible to use wildcard subdomains in combination with GitHub as OAuth provider? #550
Comments
The work in #464 is for using one You are correct indeed that GithHub will only let you set one redirect URL and that should be the URL of your We do this within our Kubernetes Ingress so I can't really advise how else you might do this if that isn't your use case. Although, ig you put Nginx in front of any website you want to protect and use the auth request method you should be able to protect multiple internal sites with a single |
@JoelSpeed Thx! I'll give the code in your PR a try. |
@JoelSpeed Trying to understand the flow you currently have: Does the Kubernetes ingress you use redirect (301?) to Or does the Kubernetes ingress do the equivalent of nginx's |
@simonvanderveldt Our ingress object proxies to the app as it normally would with any service. To protect it with the oauth_proxy we simple add the following annotations to the ingress object and as you say, it uses nginx's We have the Note that we are using the Nginx ingress controller for this, I don't think other controllers support these annotations out of the box
|
@JoelSpeed Awesome, thanks a lot! |
@JoelSpeed I've tried your way but having issue with cyclic redirects (Github oauth2). github: When trying to auth |
Managed to make it work |
I was wondering if oauth2_proxy in combination with GitHub as Oauth provider allows the possibility of using wildcard subdomains for a single GitHub Oauth app?
AFAIK that's most of the time done through the
state
arg, but I don't think there's a way to add custom values tostate
at the moment.Also, the wildcard/whitelisted subdomains functionality from #464 doesn't seem to work for this use case, probably because github always redirects to the Authorization callback URL, which is not subdomain specific.
Is this simply not possible or am I missing something?
The text was updated successfully, but these errors were encountered: