How we served 20k IPython notebooks for Nature readers
developer.rackspace.com
developer.rackspace.com
I was thinking about setting up a similar IPython-as-a-service thing, but 5 minutes on Google suggested that it would be difficult to do it securely.
This isn't just limited to data security, but also DDoS concerns. I.e. making sure that each user doesn't take up too much CPU/RAM/HDD.
On second though, I'm sure its possible, but it certainly wasn't trivial.
https://github.com/jupyter/tmpnb/blob/44ff714e6e65897547dac5...
I'm pretty sure you can also tweak IO scheduling with cgroups.
Second, defense in depth, you want to have some defense in place even in the presence of an exploit and the usual first line of defense would normally be, don't run arbitrary code. So that line is broken by design for IPython-a-a-S, the user can just copy the latest exploit into the IPython notebook. This suggests virtualization, so that you have one VM per user and the user needs to break out of the virtualization and out of the cgroups jail mentioned above, before he can do anything interesting. (It has also the benefit, that user management is somewhat simplified.)
So overall, I guess it can be done, but needs a focus on security.
[0] this suggests the notion of an interpreter breakout. Yes this is a joke.
From what I've seen, trying to bolt security and isolation back onto Docker is generally a bad idea.
That said, when people have done the work to make microservices deployable under Docker, they have in general laid the groundwork needed to run these services in a truly isolated environment. So in that respect Docker is great; the effort to run something that works in a minimal Docker container in a jail/chroot/vm should be much less than starting from scratch; a lot of the assumptions about resources/dependencies should already be fixed.
[EDIT] - screenshot of bug: http://imgur.com/kXoMtvM [/EDIT]