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: 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:


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

        "entryPoint": [
        "command": [

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.