postgresqlpgadminpgadmin-4

pgAdmin failed to save password for users


I have pgAdmin (dpage/pgadmin4:4.29) container running in Kubernetes. As a master user I have added Database connections and share the connection. I can disconnect/reconnect to database without password as a master user.

But for additional users I have created, those users password are not getting saved even they have selected Save Password option at the time of connection. pgAdmin keep asking for password when connecting to DB.

What I am missing in my setup.


Solution

  • NobleUplift's issue of the "Save Password" checkbox being disabled can be caused by certain config flags in the config.py file. Remembering passwords for SSH tunneling is disabled by default, for example.

    You can re-enable the checkbox by writing

    ALLOW_SAVE_TUNNEL_PASSWORD = True  # SSH tunnel password saving, default False
    ALLOW_SAVE_PASSWORD = True         # database password saving, default True
    

    to a new config_local.py file in the same directory where you find your main config.py file. Pg discourages writing the the main config.py file directly. See the docs for more details about the preferred config file and where to find them. (I found mine under "pgAdmin 4\v6\web\config.py", not where the docs said.)

    This seems to be where the 'disable password saving' idea came from.

    Apologies roy for not answering your question directly, but I didn't have the ability to respond directly to Noble. However, the config docs also mention that the ENHANCED_COOKIE_PROTECTION flag can interfere with Kubernetes (and other auth settings), which might be worth a look.