diff --git a/docs/source/public_server.rst b/docs/source/public_server.rst index 7b8ce216a..efe5a86e3 100644 --- a/docs/source/public_server.rst +++ b/docs/source/public_server.rst @@ -53,6 +53,7 @@ configuring the :attr:`NotebookApp.password` setting in Prerequisite: A notebook configuration file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Check to see if you have a notebook configuration file, :file:`jupyter_notebook_config.py`. The default location for this file is your Jupyter folder in your home directory, ``~/.jupyter``. @@ -66,7 +67,20 @@ using the following command:: Preparing a hashed password ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can prepare a hashed password using the function + +As of notebook version 5.0, you can enter and store a password for your +notebook server with a single command. +:command:`jupyter notebook password` will prompt you for your password +and record the hashed password in your :file:`jupyter_notebook_config.json`. + +.. code-block:: bash + + $ jupyter notebook password + Enter password: **** + Verify password: **** + [NotebookPasswordApp] Wrote hashed password to /Users/you/.jupyter/jupyter_notebook_config.json + +You can prepare a hashed password manually, using the function :func:`notebook.auth.security.passwd`: .. code-block:: ipython diff --git a/docs/source/security.rst b/docs/source/security.rst index 491270789..aaa8dfce3 100644 --- a/docs/source/security.rst +++ b/docs/source/security.rst @@ -58,8 +58,20 @@ Once you have visited this URL, a cookie will be set in your browser and you won't need to use the token again, unless you switch browsers, clear your cookies, or start a notebook server on a new port. +Alternatives to token authentication +------------------------------------ -You can disable authentication altogether by setting the token and password to empty strings, +If a generated token doesn't work well for you, +you can set a password for your notebook. +:command:`jupyter notebook password` will prompt you for a password, +and store the hashed password in your :file:`jupyter_notebook_config.json`. + +.. versionadded:: 5.0 + + :command:`jupyter notebook password` command is added. + + +It is possible disable authentication altogether by setting the token and password to empty strings, but this is **NOT RECOMMENDED**, unless authentication or access restrictions are handled at a different layer in your web application: .. sourcecode:: python