LibreTexts / metalc

LibreTexts/UCDavis bare-metal Kubernetes cluster running JupyterHub and Binder
http://jupyter.libretexts.org
MIT License
14 stars 2 forks source link

Point jupyter.ucdavis.edu to our production jhub #237

Closed sandertyu closed 3 years ago

sandertyu commented 3 years ago

Currently jupyter.ucdavis.edu is at 128.120.136.54, but it needs to be moved to 128.120.136.55 so it goes through our kubernetes ingress. Once it does, we can probably just set up an additional host in the ingress section of the jhub helm chart in the galaxy control repo

sandertyu commented 3 years ago

The domain jupyter.ucdavis.edu points to our hub but we are lacking the proper callback url. Line 64 of our galaxy-control-repo/blob/production/kubernetes/jhub/config.yaml needs to reflect jupyterhub.ucdavis.edu as well, and I'm not sure if we need to add another authenticator section to do so. We also need to verify that the url is actually set up for oauth.

TimStewartJ commented 3 years ago

Update: The new origin and callback urls are on Google's side, now it's just a matter of dynamically changing the callback url depending on which domain the user logged in from (theoretically). We should be able to do this through modifying the code in the extra-config section jhub's config; Documentation on OAuthenticator can be found here.

TimStewartJ commented 3 years ago

Okay, after digging around in the OAuthenticator code, it looks like if we simply remove the oauth_callback_url line, it will automatically assume the callback url based on the originating request. I've made a PR for this change, if someone else wants to look at it and confirm this is the direction we want to go, then we're good on this issue.

This new configuration is now currently applied on production so anyone should be able to visit jupyterhub.ucdavis.edu and login normally.

moorepants commented 3 years ago

Nice find! Simple solution.