Skip to content

Support for SCRAM-SHA-256 authentication#788

Closed
mdevan wants to merge 5 commits intolib:masterfrom
rapidloop:scram
Closed

Support for SCRAM-SHA-256 authentication#788
mdevan wants to merge 5 commits intolib:masterfrom
rapidloop:scram

Conversation

@mdevan
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown

kmoppel commented Oct 29, 2018

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

@ptman
Copy link
Copy Markdown

ptman commented Nov 10, 2018

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

@ptman
Copy link
Copy Markdown

ptman commented Apr 16, 2019

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

@knz
Copy link
Copy Markdown

knz commented Apr 17, 2020

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

@Neustradamus
Copy link
Copy Markdown

@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