-
Notifications
You must be signed in to change notification settings - Fork 404
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
sslmode should default to "prefer" not "disable" #654
Comments
elprans
added a commit
that referenced
this issue
Nov 26, 2020
Switch the default SSL mode from 'disabled' to 'prefer'. This matches libpq's behavior and is a sensible thing to do. Fixes: #654
elprans
added a commit
that referenced
this issue
Nov 26, 2020
Switch the default SSL mode from 'disabled' to 'prefer'. This matches libpq's behavior and is a sensible thing to do. Fixes: #654
elprans
added a commit
that referenced
this issue
Nov 27, 2020
Switch the default SSL mode from 'disabled' to 'prefer'. This matches libpq's behavior and is a sensible thing to do. Fixes: #654
elprans
added a commit
that referenced
this issue
Nov 29, 2020
Switch the default SSL mode from 'disabled' to 'prefer'. This matches libpq's behavior and is a sensible thing to do. Fixes: #654
elprans
added a commit
that referenced
this issue
Nov 29, 2020
Switch the default SSL mode from 'disabled' to 'prefer'. This matches libpq's behavior and is a sensible thing to do. Fixes: #654
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
asyncpg==0.21.0
the issue with a local PostgreSQL install?: Heroku, yes
uvloop?: yes (I guess)
The docstring for
connect
says:asyncpg/asyncpg/connection.py
Lines 1757 to 1762 in 92aa806
(the associated link to the docs is broken, but I've fixed that in #653, should link to here)
But this is not correct, currently asyncpg defaults to the equivalent of
sslmode=disable
, e.g. it doesn't try to use SSL for the connection, while the linked postgresql.org docs says, regarding sslmode:e.g.
prefer
is the default.asyncpg too should default to
prefer
.This caused a connection error when upgrading a heroku database from hobby tier to standard - the latter requires SSL.
From reading the source, it looks like the best work around for now will be to set the environment variable
PGSSLMODE=prefer
:asyncpg/asyncpg/connect_utils.py
Lines 397 to 398 in 92aa806
The text was updated successfully, but these errors were encountered: