On Fri, Jun 16, 2023 at 2:50 PM Laurenz Albe <laurenz.albe@xxxxxxxxxxx> wrote:
There is an existing solution for that: the libpq connection service file:
https://www.postgresql.org/docs/current/libpq-pgservice.html
The problem with the service and password files is that passwords are in plain text though.
Yes there are restrictions on permissions of the password file (on Linux), still having some
kind of encrypted token with an expiration date would be better IMHO.