I've setup a Jupyter Notebook server with appropriate password and SSL so it is accessed via HTTPS. However, I'm looking now for a way to enforce a two factor authentication with username and password for loging in. The current Jupyter Notebook server only asks for a password and I hence have to create a shared one (no username though).
I know about JupyterHub, but at the moment I'm looking for a way to add a username (or multiple usernames) and correspond password (passwords), so that everyone can access the same work space without necessarily having credentials on the Linux server side.
Is this even possible, or do I have to resort to deploying a JupyterHub server?
GitHub's OAuth has been used for JupyterHub authentication and seems fairly easy to configure though I have to confess I have only ever used the builtin server-side authentication. I would think it would be pretty decent solution if you don't want to have to create accounts server side for each user.
there is a login hook in the config. You can write your own authentication there.
来源:https://stackoverflow.com/questions/35516906/two-factor-authentication-with-username-and-password-for-a-jupyter-notebook-serv