rapidloop / pgmetrics

Collect and display information and stats from a running PostgreSQL server
https://pgmetrics.io
Apache License 2.0
960 stars 65 forks source link

Windows/SSPI: gives "unknown authentication response: 9" #25

Open Bill-Stewart opened 5 years ago

Bill-Stewart commented 5 years ago

Trying to authenticate using SSPI on Windows - see

https://wiki.postgresql.org/wiki/Configuring_for_single_sign-on_using_SSPI_on_Windows

I can open a shell window using the Windows domain account and run PostgreSQL commands (Windows domain account is PostgreSQL superuser).

Can I do the same with pgmetrics? I try:

pgmetrics.exe -h localhost -U username -w databasename

Output:

pgmetrics: pq: unknown authentication response: 9

Or is this not supported?

mdevan commented 5 years ago

Does it behave properly without SSPI auth (with trust/md5/scram)?

Collecting metrics from Postgres servers running on Windows has not been tested much. Bug reports welcome.

Neither of the 2 popular Go libraries for Postgres (lib/pq and jackc/pgx) support SSPI (or even GSSAPI), so SSPI support has to be added there first. We did patch lib/pq to support SCRAM, but that was easier to test.

Bill-Stewart commented 5 years ago

Does it behave properly without SSPI auth (with trust/md5/scram)?

I don't know, since we only use SSPI.