On Sun, Mar 5, 2017 at 9:43 AM, Dirk Grunwald <[email protected]> wrote:
To be a bit more precise -- I have the Cloud9 SDK packaged in 'standalone' > most listening to port 8888 and that container starts up just fine when > JupyterHub launches it through kubernetes. > > When I launch the same container using docker and go to e.g. > http://localhost:8888, I get a 302 to redirect to /ide.html and then the > Cloud9 IDE displays properly. > > When the C9 container launches from JupyterHub, I am redirected to > https://jhub.a.b.c.d.xip.ui/user/grunwald --- however, rather than > getting a 302 redirect, I get a message "Cannot GET /user/grunwald" > indicating that some routing hasn't been set up internally or that there's > an authorization failure because I don't completely understand how > JupyterHub assumes the proxied web service / notebook coordinate. What I > was expecting was the 302 -> then to /user/grunwald/ide.html which I assume > would be proxied as /ide.html to the container. > > I also get this using curl e.g. "*curl --insecure > https://jhub.35.185.207.218.xip.io/user/grunwald > <https://jhub.35.185.207.218.xip.io/user/grunwald> > * > > *Cannot GET /user/grunwald"* > > Do I need to use something to establish a cookie between the proxy & the > backend web server? > I saw "GET /authorizations/cookie/{cookie_name}/{cookie_value}" in the > API docs, but wasn't clear how to use that. > The docs for integrating authentication with JupyterHub are here <http://jupyterhub.readthedocs.io/en/latest/services.html#hub-authentication-and-services>. When you login to JupyterHub, it sets a cookie on both /hub/ and /user/yourname/. This cookie is passed to your server when a browser connects, and you can check with the Hub to identify the user via this REST API. I’m working on <https://github.com/jupyterhub/jupyterhub/pull/938> switching JupyterHub to using OAuth internally, so that any application that can use OAuth would be able to be integrated with JupyterHub. -MinRK > > I realize this is a somewhat non-standard use of JupyterHub, but my goal > is to have one system set up the NFS, authorization, etc for both the > notebook interface and other web services. > > > On Saturday, March 4, 2017 at 6:10:20 PM UTC-7, Dirk Grunwald wrote: >> >> We'd like to use JupyterHub (on google kubernetes) as a programming >> environment for students. We'd also like to use Cloud9's SDK because it's a >> better programming environment (IMHO) for non-notebook programs. >> >> I want to use JupyterHub as the authentication & multiplex agent -- i.e. >> students can decide which environment to use, and they'll have the same NFS >> mount either way (I'm basing my setup on the recipe at >> https://github.com/ssableslb/gke-jupyter-classroom ) >> >> I'm trying to figure out how to get JupyterHub to start up my C9 SDK >> container - that container pops up at port 8888 like an ipython notebook >> would when I run it locally, but I can't seem to broker a connection -- I'm >> guessing that it needs to somehow pass information to JupyterHub to >> authorize the connection, but I am having trouble finding the documentation >> on that. I've looked at the docs for JupyterHub and Jupyter, but the >> Jupyter documentation appears to focus on the communication to the specific >> kernels (as opposed to the web GUI part). >> >> Any suggestions of what doc/code to examine welcome. >> >> Thanks >> > -- > You received this message because you are subscribed to the Google Groups > "Project Jupyter" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jupyter/029e8acb-38b4-43e9-b433-1d7ece47e1d9%40googlegroups.com > <https://groups.google.com/d/msgid/jupyter/029e8acb-38b4-43e9-b433-1d7ece47e1d9%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAHNn8BWQBEmwHU0-ENz4deLkHp6XAi4zsVgm_B2UbT5xXP3ARg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
