From 02846c2b490a2b999a8263ee39d0328d0ceab6e6 Mon Sep 17 00:00:00 2001 From: irvcaza Date: Tue, 28 Jun 2022 23:00:31 -0500 Subject: [PATCH 1/5] Update passwd function The use of `IPython.lib.passwd()` does not match with Jupyter server documentation https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html#preparing-a-hashed-password and may lead to confusion on how to import/use it. --- docs/using/common.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/using/common.md b/docs/using/common.md index a8ba11dd..1fc9913d 100644 --- a/docs/using/common.md +++ b/docs/using/common.md @@ -10,7 +10,7 @@ This page describes the options supported by the startup script and how to bypas You can pass [Jupyter server options](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html) to the `start-notebook.sh` script when launching the container. -1. For example, to secure the Notebook server with a custom password hashed using `IPython.lib.passwd()` instead of the default token, +1. For example, to secure the Notebook server with a [custom password](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html#preparing-a-hashed-password) hashed using `notebook.auth.security.passwd()` instead of the default token, you can run the following (this hash was generated for `my-password` password): ```bash From 9219b8cc164c9fdebef28fc2a1bbca4decdf6b1e Mon Sep 17 00:00:00 2001 From: irvcaza Date: Tue, 28 Jun 2022 23:10:42 -0500 Subject: [PATCH 2/5] Line split to comply with linting docs/using/common.md:13:201 MD013/line-length Line length [Expected: 200; Actual: 253] --- docs/using/common.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/using/common.md b/docs/using/common.md index 1fc9913d..f1f6d578 100644 --- a/docs/using/common.md +++ b/docs/using/common.md @@ -10,7 +10,8 @@ This page describes the options supported by the startup script and how to bypas You can pass [Jupyter server options](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html) to the `start-notebook.sh` script when launching the container. -1. For example, to secure the Notebook server with a [custom password](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html#preparing-a-hashed-password) hashed using `notebook.auth.security.passwd()` instead of the default token, +1. For example, to secure the Notebook server with a [custom password](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html#preparing-a-hashed-password) +hashed using `notebook.auth.security.passwd()` instead of the default token, you can run the following (this hash was generated for `my-password` password): ```bash From e49abd45cb19903c9bf121f6605a20ca297c38ab Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 04:11:01 +0000 Subject: [PATCH 3/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/using/common.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/using/common.md b/docs/using/common.md index f1f6d578..74052b9c 100644 --- a/docs/using/common.md +++ b/docs/using/common.md @@ -10,8 +10,8 @@ This page describes the options supported by the startup script and how to bypas You can pass [Jupyter server options](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html) to the `start-notebook.sh` script when launching the container. -1. For example, to secure the Notebook server with a [custom password](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html#preparing-a-hashed-password) -hashed using `notebook.auth.security.passwd()` instead of the default token, +1. For example, to secure the Notebook server with a [custom password](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html#preparing-a-hashed-password) + hashed using `notebook.auth.security.passwd()` instead of the default token, you can run the following (this hash was generated for `my-password` password): ```bash From 7efcf03026869dddcd0235c9bba0479e1e012639 Mon Sep 17 00:00:00 2001 From: irvcaza Date: Sat, 2 Jul 2022 00:34:11 -0500 Subject: [PATCH 4/5] Default Hash changed to Argon Now passwd() returns an argon2 hash by default. --- docs/using/common.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/using/common.md b/docs/using/common.md index 74052b9c..48a22ecc 100644 --- a/docs/using/common.md +++ b/docs/using/common.md @@ -16,7 +16,7 @@ You can pass [Jupyter server options](https://jupyter-server.readthedocs.io/en/l ```bash docker run -it --rm -p 8888:8888 jupyter/base-notebook \ - start-notebook.sh --NotebookApp.password='sha1:7cca89c48283:e3c1f9fbc06d1d2aa59555dfd5beed925e30dd2c' + start-notebook.sh --NotebookApp.password='argon2:$argon2id$v=19$m=10240,t=10,p=8$JdAN3fe9J45NvK/EPuGCvA$O/tbxglbwRpOFuBNTYrymAEH6370Q2z+eS1eF4GM6Do' ``` 2. To set the [base URL](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html#running-the-notebook-with-a-customized-url-prefix) of the notebook server, you can run the following: From df919dbcbc795c2132d963bf81c1a3861a9f4936 Mon Sep 17 00:00:00 2001 From: irvcaza Date: Sat, 2 Jul 2022 12:47:33 -0500 Subject: [PATCH 5/5] notebook updated to jupyter_server --- docs/using/common.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/using/common.md b/docs/using/common.md index 48a22ecc..6e910a30 100644 --- a/docs/using/common.md +++ b/docs/using/common.md @@ -11,7 +11,7 @@ This page describes the options supported by the startup script and how to bypas You can pass [Jupyter server options](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html) to the `start-notebook.sh` script when launching the container. 1. For example, to secure the Notebook server with a [custom password](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html#preparing-a-hashed-password) - hashed using `notebook.auth.security.passwd()` instead of the default token, + hashed using `jupyter_server.auth.security.passwd()` instead of the default token, you can run the following (this hash was generated for `my-password` password): ```bash