-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for SCRAM-SHA-256 SASL authentication (#89)
* Add protocol awareness and encode/decode for authentication message types 10 (SASL mechanisms), 11 (SASL continue), and 12 (SASL final). Add more specific errors for types 2(Kerberos), 7(GSSAPI), 8(GSSAPI), 9(SSPI), and 6(obsolete SCM). * Add generic SASL authentication management class with pluggable (via generics) SASL mechanism implementations. * A mostly complete, if very, VERY messy, implementation of SCRAM-SHA-256 and SCRAM-SHA-256-PLUS per RFC 7677 et al. Things that are still missing: Channel binding support (Postgres DOES use this), authorization names (Postgres does not use these), proper username and password normalization, RFC-compliant validation of nonces, and determining whether the Hi() function can be replaced with PBKDF2 * Extend PostgresConnection to use SCRAM-SHA-256 negotiation when offered. * Heavily update test matrix. Leave several of the Swift version/OS combos disabled to cut down on the excessive number of checks generated by the test matrices (72 instead of 234).
- Loading branch information
Showing
7 changed files
with
1,101 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.