-
Notifications
You must be signed in to change notification settings - Fork 65
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
Authenticated and optionally private static websites served from a hub #1500
Comments
The 'hosted documentation' is not available only to logged-in users. That would require an OAuth based proxy which we don't currently have setup. My suggestion is to use nbgitpuller setup for private repository access - users can get a link they can click that can take them to markdown or a notebook file with information |
Is it possible for us to add a The challenge I see with this approach is that the content will be attached to an event, and the organizers will want it to update quickly and somewhat often as they update the source content in the event. I worry that an nbgitpuller approach will require users to take extra "click" actions that in practice will be clunky. |
The 'right' way to do this is to use https://oauth2-proxy.github.io/oauth2-proxy/ and have that authenticate against the JupyterHub as a service. We need to do that properly once and then it can be reused elsewhere! More specifically, we'll need to:
This should allow us to host arbitrary static sites protected by JupyterHub login. |
ok so I got nerdsniped into this. Here's a bunch of findings:
I've this working locally! A issuer: http://127.0.0.1:8000/services/dex
storage:
type: sqlite3
config:
file: dex.sqlite
web:
http: 0.0.0.0:5556
oauth2:
skipApprovalScreen: true
connectors:
- type: oauth
# ID of OAuth 2.0 provider
id: hub
# Name of OAuth 2.0 provider
name: hub
config:
# Connector config values starting with a "$" will read from the environment.
clientID: service-dex
clientSecret: wateriswet
redirectURI: http://127.0.0.1:8000/services/dex/callback
userIDKey: name
tokenURL: http://127.0.0.1:8000/hub/api/oauth2/token
authorizationURL: http://127.0.0.1:8000/hub/api/oauth2/authorize
userInfoURL: http://127.0.0.1:8000/hub/api/user
staticClients:
- id: oauth2-proxy
redirectURIs:
- 'http://127.0.0.1:9000/oauth2/callback'
name: 'oauth2-proxy'
secret: proxy A
Then I can start the oauth2-proxy with:
And now if I go to http://127.0.0.1:9000, I'll get redirected to the hub, asked to log in and then I'll see my static files! \o/ I'll have to port this to this repo, but that should be doable. |
The one thing it's missing is JupyterHub's |
auth-oauth-proxy.mp4here's a demo of the auth flow! |
🎉 🎉 waaa, this is great @yuvipanda !!! |
Note that this now enables two new use cases:
|
This is great, @yuvipanda!! |
Hey all - I think that this one was accidentally closed early. We implemented the feature here: but, we still don't have user-facing documentation for this functionality. In my opinion, if it is not documented for a particular user archetype, then the feature doesn't exist from their perspective. In this case, we have documentation for our engineers, but not for any user or external community member. Given that this is a user-facing feature, we shouldn't consider this issue resolved until it is documented for users. This is the issue that needs resolution: |
Lemme know if you want to hear more about how we used this in NeuroHackademy. |
@arokem YESSSSS TELL ME! |
Here's our use case: Because we had participants both in person and on zoom, and we sometimes had multiple rooms where activities were going on at the same time, we wanted one page that would have all the links to zoom, mapped to physical locations. So we used this website for that. The (rather unadorned) page had a list that looked roughly like:
where Alder auditorium, Alder 103, etc. are physical spaces at UW's Alder Hall. That way, when we announced the schedule for the day, we could say something like "Ariel's lecture on data visualization will take place at Alder 103 at 10am" and that would mean both a physical space, as well as a zoom room. The importance of this being behind the authentication is that we didn't want anyone zoom-bombing us. One use case -- I imagine there are others. |
@jmunroe, to make a decision on how to communicate this to the communities. |
Update: This feature is currently broken, #2206. |
Context
Our hosted documentation service describes how people can point the hub to a github repository branch with HTML files that it then serves as a service.
However, there are a few things unclear from the documentation:
Proposal
We should answer each of the questions above, and potentially do some development work to make it possible if not already.
Updates and actions
infra
: Setup ability to provide authenticated ingresses to arbitrary web apps #1502References
The text was updated successfully, but these errors were encountered: