Passing authenticated per-user identity to the server

Stefan Urbanek <[email protected]> Fri, 24 Apr 2015 17:34:07 -0400
Newsgroups gmane.comp.python.ipython.user
Message-ID <CABHszyQkhQyreVrwcmnWFA1rfYV8A_kFhC_LVToNWYR_W9MqnQ@mail.gmail.com>
Hi,

We are running the iPython server (built-in server) to which multiple users
are being connected. The users are connecting to a database using
SQLAlchemy. We want every user to connect to the database using his own
credentials – we don't want to store the connection URL in the notebook. We
can put the proper authorization into our library that the user will use in
the notebook: special password, host based authorization, ... does not
matter, the library can take care of that. However, we need to pass the
information about the user (username, id, key, ...) to the library through
the server. Something like this:

    from ourdblib import connect

    connnection = connect()

the connect() should get the user credentials for that particular
user-browser session somehow (environment variable, python object, notebook
variable, ...) . We can provide our own authentication, we can even have a
front-end that can pass wsgi params or something, we just need to be able
to pass the user's identity to the notebook server so it can be passed to
the library.

In other words: if I'm using ipython notebook on the server, I want the
server know about me. We can have our own tools to verify me and pass my
identity to the server. What is the way to pass this information to the
server?


How can we do that?

Thanks,

Stefan
--
I brew data.

Twitter: @Stiivi
Home: http://www.stiivi.com

_______________________________________________
IPython-User mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/ipython-user