[IPython-User] per user notebook instances
Wed Sep 21 17:09:50 CDT 2011
On Wed, Sep 21, 2011 at 1:38 AM, Moritz Emanuel Beber
> After launching the notebook kernels, I start a web server with a single
> page that directs students to their notebook via links. Can the notebook be
> password protected? Right now, everyone can access everybody else's notebook
> via the web page.
Stefan just pointed out that I failed to respond to this... The
notebook server (thanks to work by Satra Ghosh) does support SSL and
very simple authentication. You can provide the options --certfile
and --keyfile to specify respectively the path to an SSL certificate
file and (optionally) an RSA key file. Using a self-signed
certificate comes with the usual caveats that users will need to add
an exception for it, but then their session is encrypted.
And you can also specify a simple password for each notebook. This
can even be done at the command line, though that kind of defeats the
purpose (since 'ps' will show it) for anything other than testing.
But if you set the password option in the user's config file, which
can be created with user-only privileges, then they won't be able to
log into each other's notebooks.
The password is to be set in the config file option with the
IPythonNotebookApp.password option. Probably the best approach would
be to create a profile:
ipython profile create class2011
and then go to the profile_class2011 directory and edit the password
flag in the config file ipython_notebook_config.py.
This could be done automatically by the initialization script, along
with changing the permissions on that file to user-only read.
Nothing fancy, but it should do the job.
More information about the IPython-User