Repository navigation
PgBouncer md5 FIPS compatibility changes - #949
Merged
Merged
Conversation
JelteF
reviewed
Sep 22, 2023
JelteF
requested changes
Sep 22, 2023
JelteF
left a comment
Member
There was a problem hiding this comment.
Compilation is failing on CI for many targets
Member
|
Compilation of the hba_test binary is failing currently |
JelteF
reviewed
Sep 22, 2023
Co-authored-by: Jelte Fennema-Nio <github-tech@jeltef.nl>
JelteF
requested changes
Sep 25, 2023
Co-authored-by: Jelte Fennema-Nio <github-tech@jeltef.nl>
Co-authored-by: Jelte Fennema-Nio <github-tech@jeltef.nl>
JelteF
approved these changes
Sep 26, 2023
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause:
MD5 encryption functions are internally implemented in libusual (./lib/usual/crypto/md5.c). MD5 Authentication functions can not be used on FIPS compliant host. Due to internal implementation of MD5 algorithm, MD5 authentication is working without error on FIPS enabled host. Ideally it should throw error.
Solution:
Due to internal implementation, we are not using openssl APIs for MD5. In this fix all internal MD5 calls are replaced to openssl APIs after which MD5 authentication throws expected error on FIPS compliant host.
Testing:
Pytest testsuite ran successfully.
MD5 authentication scenario on non-FIPS compliant host runs successfully with and without compiling with “--without-openssl ” flag.
MD5 authentication scenario on FIPS compliant host errors out as expected when compiled with openssl flag.
MD5 authentication scenario on FIPS compliant host runs successfully when compiled with " “--without-openssl ” flag.