Cannot log in to UI while Postgres uses "trust" authentication
The issue was reported by @marcin during 1.10 sanity checks. Source.
I am unable to log in to the Stork UI when Postgres is using trust
authentication with no password.
Suppose that's part of your pg_hba.conf
:
local all postgres peer
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all stork trust
local all all peer
It configures the database to allow user Stork with no password. I can start Stork server with this configuration and an empty (default) password. However, I get an error trying to login to the Stork UI because the session manager is using libpq library (not a go-pg
library) which in our case is not handling well this authentication method:
stork-server[17064]: 2023/04/04 20:44:35 pq: password authentication failed for user "stork"
Using the password
authentication and specifying the password in the server.env
file works.
BTW, I tried it on Ubuntu 22.04 with Stork installed from the packages.