-
Notifications
You must be signed in to change notification settings - Fork 189
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
Use oauth2-proxy with GitHub Auth Provider to secure Admin apps #3030
Comments
I think that once we do this, we can configure Portainer to use it too (this needs more research, see https://oauth2-proxy.github.io/oauth2-proxy/docs/features/endpoints): |
See #2801 (comment) which outlines some of what has to happen. NOTE: we don't need to do SSL or the like here. In the case of Telescope, we need to:
Each of you can take some part of this and file new issues to get it landed. Let me know who is doing what, and what help you need. |
Spend a few days doing research and testing this. demo.mp4But I have some questions, do we use oauth2 proxy's endpoints for sign out? I never used portainer, not sure how that works. I looked at @humphd discussion with the picture of some sort of UI, but not sure where that is from.
|
@Kevan-Y fantastic! Can you say more about your concerns with signout? Portainer is like the Traefik dashboard you used: just a web app we want to restrict access to. If you can make this work with Traefik's dashboard, we can do it with anything. "it doesn't support subdomain" can you say more? So we'd have to do it per sub-domain? That's not a huge problem. |
I never used portainer before, I'm not sure if there is a signout button or it's a login without signout. Sorry, I think I wrongly described my thought in the previous message. |
I think if we put oauth proxy behind portainer. We don't need to set up this configuration in portainer. A solution for this issue would be (Will have a PR this week for portainer):
Later on in follow up issue: |
There's no way to disable auth in Portainer, so I'd like to have the oauth method work if possible. |
I think turning off automatic user provisioning, and having to create a user, whose name matches the GitHub username, isn't a terrible way to handle this. cc @cindyledev |
If we go this way oauth2-proxy will won't be used here but would be useful for cases like supabase. |
Do you mean "won't be used here"? |
yes sorry, typo |
What's the process to create a GitHub app? |
https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app. Let's try on staging first before creating one for https://portainer.telescope.cdot.systems/ I will need the client ID + secret |
authorization callback URL is https://dev.portainer.telescope.cdot.systems/ |
Staging and Production are both using GitHub OAuth now! Thank you @Kevan-Y. If you need an account created, @cindyledev can hook you up. |
ConclusionPortainer custom Oauth with GitHub in Staging and Production. |
We've pretty much solved authentication for users. Next, I want to solve authentication for our "admin" apps. These are areas of the system that only our dev team should be able to access (e.g., Supabase console).
One solution is for us to add oauth2-proxy and configure it with the GitHub Auth Provider, which can be set up to further limit to use a GitHub org, team, repo, etc.
We can connect oauth2-proxy to either nginx or traefik.
The text was updated successfully, but these errors were encountered: