Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgmetrics 1.4.0 failed to support scram authentication #17

Closed
xianwum opened this issue Sep 7, 2018 · 3 comments
Closed

pgmetrics 1.4.0 failed to support scram authentication #17

xianwum opened this issue Sep 7, 2018 · 3 comments

Comments

@xianwum
Copy link

xianwum commented Sep 7, 2018

I have a database (PostgreSQL 10.3) with password of dbuser encrypted with scram-sha-256.
The entry in pg_hba.conf is "host [database] [user] [ip] md5"

When running pgmetrics for the database, it got an error

pgmetrics: pq: unknown authentication response: 10

This indicates scram authentication is not supported.

I have to change the password encryption of dbuser with md5 or disable authentication method in pg_hba.conf by adding entry "host trust" to overcome the error.

In production environment, neither of the above workaround is allowed.

Can you please check and resolve the above issue?

@mdevan
Copy link
Contributor

mdevan commented Sep 8, 2018

Needs scram support in Go lib/pq driver, there is a pending PR: lib/pq#608. Will see if it can be worked around in pgmetrics.

@mdevan
Copy link
Contributor

mdevan commented Sep 13, 2018

Fixed in release v1.4.2 with commit 3352310. Release available here.

SCRAM auth support was added to lib/pq -- currently forked as rapidloop/pq, but also submitted to lib/pq as PR lib/pq#788.

@mdevan mdevan closed this as completed Sep 13, 2018
@Neustradamus
Copy link

@xianwum, @mdevan: Attention another PR has been merged in lib/pq:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants