Support for .pgpass config file
The psql CLI supports reading from the ~/.pgpass configuration file with a standard format, so that you don't need to put passwords into the command-line history or enter them in every time.
Could pgweb read this file and replace an empty password with one found in there for a matching host?
Yes, this feature could be supported, but only in a single session mode.
Closing due to no activity. I've personally never used pgpass files and nobody else expressed interest in the feature so far.
I just found (and liked) your UI, and support for ~/.pgpass is the first thing I went to check.
I would strongly prefer to use ~/.pgpass, precisely for the reason original posted requested: don't want passwords in history and in command line. psql client requires that ~/.pgpass be readable only by the file owner, whereas no such check exists for the shell's history file.
I would offer to implement this, but alas I haven't written (and until today - not even read) a single line of go code.
Btw, while i havent added the support for pgpass file, you can get away with using bookmarks. By using bookmarks you're not exposing any passwords in the web or cli.
Since I posted my original comment, I have indeed found bookmarks, which do provide this functionality. (.pgpass would have the benefit of working w/o me adding a password to yet another file).
Thank you for your response and for reconsidering this ticket.
I think .pgpass would provide a way for pgweb to use connections without adding the credentials to the urls.
My issue so far is that I would like to use bookmarks feature and expose some databases to users, however there is no way to hide the credentials for the db. pgpass would provide a solution.
Implementing pgpass into pgweb, would be a great benefit for pgweb. At the moment I‘m looking for a web-based db-browser, using this feature.
Should be available in the next version.