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

SCRAM support #231

Closed
keithf4 opened this issue Nov 8, 2018 · 8 comments
Closed

SCRAM support #231

keithf4 opened this issue Nov 8, 2018 · 8 comments

Comments

@keithf4
Copy link

keithf4 commented Nov 8, 2018

Appears that postgres_exporter doesn't support when SCRAM password authentication is set in pg_hba.conf.

https://www.postgresql.org/docs/10/auth-methods.html#AUTH-PASSWORD

Nov  8 10:52:30 localhost postgres_exporter: time="2018-11-08T10:52:30-05:00" level=info msg="Error opening connection to database (postgresql://ccp_monitoring:PASSWORD_REMOVED@localhost:5432/postgres?sslmode=disable): pq: unknown authentication response: 10" source="postgres_exporter.go:1030"

Thankfully just setting an override line above other entries in pg_hba.conf for the postgres_exporter role to md5 allows it to work for now even when the internal password storage is scram.

@ptman
Copy link

ptman commented Nov 10, 2018

The support is needed in lib/pq: lib/pq#608 or lib/pq#788

@onderaycicek
Copy link

This issue solved. lib/pq#833

@jesperpedersen
Copy link

https://github.com/lib/pq/releases/tag/v1.1.1 contains the support for this

@RobAtticus
Copy link

Wanted to resurface this @wrouesnel because we have found it to be quite important in a project we're working on. I see there's a PR (#278) to address this, although it's biting off a lot in addition. Is it possible to get this change in by itself, which seems to be just updating the pq dependency to 1.1.1?

@jesperpedersen
Copy link

Yeah, and https://github.com/lib/pq/releases/tag/v1.2.0 is out now

@wrouesnel
Copy link
Contributor

Resolved in v0.6.0 and latest.

@brunolnetto
Copy link

Hi, folks. I start postgres_exporter.service on Linux 20.04. I am unable to connect to the target database. Hhe resuling log is pq: unknown authentication response: 10. It seems, there is some issue with SCRAM-SHA-256 I am not aware of. May you provide the steps or commands necessary to resolvethis issue?

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

8 participants