PasswordIdentityProvider.hashed_password not working or ignored on AWS ECS

For a learning path that involves Jupyter/Terraform/AWS, I have set up a personal Jupyter Lab installation with AWS ECS (using this image: quay.io/jupyter/datascience-notebook) with an Apache HTTPD as a public proxy (I couldn’t afford a Load Balancer :slight_smile: )

The token authentication works fine, however I would like to take advantage of the password protected option.
Therefore I have hashed a string: thepassw0rd with the following:

from jupyter_server.auth import passwd; passwd(“thepassw0rd”)

which results in:

‘argon2:$argon2id$v=19$m=10240,t=10,p=8$eS3MzY/kj7h5+u/NNKQQ8g$xVwFEkt79DgLdN/gOmuFzjNCHJficGR3q2HxI9E70wk’

then added it to the command parameters of container_definitions. Here’s the relevant fragment:

        "entryPoint": [
          "start-notebook.sh"
        ],
        "command": [
          "--no-browser",
          "--ServerApp.notebook_dir=/home/jovyan/notebooks",
          "--PasswordIdentityProvider.hashed_password='argon2:$argon2id$v=19$m=10240,t=10,p=8$eS3MzY/kj7h5+u/NNKQQ8g$xVwFEkt79DgLdN/gOmuFzjNCHJficGR3q2HxI9E70wk'",
          "--ServerApp.allow_origin='*'",
          "--ServerApp.ip='0.0.0.0'"
        ],

this has the effect of disabling the token access, so I suppose the command is succesfully accepted by ECS engine. However, I am getting invalid credentials (HTTP 401) which redirects me to the login page in an infinite loop.

[W 2023-11-21 11:40:25.871 ServerApp] 401 POST /login?next=%2Flab...

What am I missing ? I remind you that it’s an ECS installation, so there’s no configuration files I can modify.