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

Support for SCRAM-SHA-256 authentication #788

Closed
wants to merge 5 commits into from
Closed

Conversation

mdevan
Copy link

@mdevan mdevan commented Sep 8, 2018

This pull request add support for SCRAM authentication.

The code in scram.go is an implementation of RFC 5802 and similar to the canonical C implementation at https://github.com/postgres/postgres/blob/master/src/interfaces/libpq/fe-auth-scram.c.

Testing

The test code in scram_test.go tests users with md5 and scram verifiers against md5 and scram matches in pg_hba.conf. To test locally, first update your local pg_hba.conf with the changes in .travis.sh.

Dependencies

The code introduces two new dependencies, github.com/xdg-go/stringprep for stringprep of the password and golang.org/x/crypto/pbkdf2 for key derivation.

[Edit: added note about dependencies]

@mdevan
Copy link
Author

mdevan commented Sep 8, 2018

The Travis failure (https://travis-ci.org/lib/pq/jobs/426071817) does not appear to be related to the changes.

@kmoppel
Copy link

kmoppel commented Oct 29, 2018

+1 a.k.a. would be nice to have this feature

@ptman
Copy link

ptman commented Nov 10, 2018

Missing SCRAM support really starts to become a problem. This or #608

@ptman
Copy link

ptman commented Apr 16, 2019

maybe the tests could be used with the merged scram auth?

@knz
Copy link

knz commented Apr 17, 2020

This PR has been superseded by #833 and can be closed.

@Neustradamus
Copy link

@knz: Can you close this PR?

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

Successfully merging this pull request may close these issues.

6 participants