-
Notifications
You must be signed in to change notification settings - Fork 403
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
asyngpg swallows error related to FIPS and MD5 #861
Comments
elprans
added a commit
that referenced
this issue
Dec 8, 2021
When server sends us an authentication request message and we fail to process it, we must terminate the connection and propagate the exception immediately. Currently asyncpg will just timeout waiting for `ReadyForQuery` from the server, which will never arrive. Fixes: #861
rohitsanj
pushed a commit
to noteable-io/asyncpg-crdb-noteable
that referenced
this issue
May 8, 2023
…MagicStack#862) When server sends us an authentication request message and we fail to process it, we must terminate the connection and propagate the exception immediately. Currently asyncpg will just timeout waiting for `ReadyForQuery` from the server, which will never arrive. Fixes: MagicStack#861
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the issue with a local PostgreSQL install?: Using RDS primarily. Issue happens anywhere.
uvloop?: Yes
With FIPS mode enabled, md5 is not allowed. And if asyncpg attempts to connect to a DB using md5 authentication if produced a timeout error. Obviously there is an issue connection with a db configured to use md5, and I was able to connect once it was updated to use
SCRAM
instead, but it took forever to figure out what the issue was due to how the error is handled.Simple script:
In 0.25.0 it says 'start' then hangs for a minute and then produces this stack trace:
The use of md5 is https://github.com/MagicStack/asyncpg/blob/master/asyncpg/protocol/coreproto.pyx#L637 unfortunately I don't know where that is getting wrapped up and ending up a timeout.
For reference this is the error you get if you try to use hashlib.md5 on a FIPS enabled machine:
I would expect that ValueError, or something along those lines, should be making it back to me, but somehow it gets caught in a loop inside until it hits the timeout. I am guessing there is an an except in there is catching too much, but without being familiar with the codebase I haven't found it yet.
The text was updated successfully, but these errors were encountered: