Do you want to work on this issue?
You can request for a bounty in order to promote it!
Passwordless Login for PostgreSQL using `peer` authentication method #667
bikeshedder posted onGitHub
Is your feature request related to a problem? Please describe.
I'm trying to connect to my database running at localhost using an unix domain socket without a password. I can run the psql
command from the commandline without a password:
I don't have anything configured in my shell. There is no PGPASSWORD
environment variable set nor is there some other kind of configuration file providing a password.
Describe the solution you'd like Add another option: "Without a password" or "Passwordless" since PostgreSQL differenciates between providing an empty password (auth method: md5) and no password at all (auth method: peer) when connecting. This is also possible for remote hosts (auth method: ident) which I've never used to be honest.
Describe alternatives you've considered I tried providing a connection string leaving out the password but the UI keeps asking me about one.
Additional context
This is the default pg_hab.conf
from Debian and Ubuntu systems and this makes it possible to log in using the system user without a password if the database username and system username matches:
I guess this is remotely related to #613 and #621
This is the SQLTools log btw.:
['sql:ext:error-handler'] Error opening connection password authentication failed for user "bikeshedder"
['sql:ext:error-handler:verbose'] [ResponseError: password authentication failed for user "bikeshedder"
at /home/bikeshedder/.vscode/extensions/mtxr.sqltools-0.22.11/extension.js:16:111706
at /home/bikeshedder/.vscode/extensions/mtxr.sqltools-0.22.11/extension.js:16:112113
at Immediate.<anonymous> (/home/bikeshedder/.vscode/extensions/mtxr.sqltools-0.22.11/extension.js:16:112655)
at processImmediate (internal/timers.js:439:21)
at process.topLevelDomainCallback (domain.js:131:23)] {
code: -32001,
data: { driver: 'PostgreSQL', driverOptions: { pgOptions: [Object] } }
}
The problem is that it's trying a "password authentication" while it should not be providing a password at all.