Skip to content
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

feat: allow direct SSL connection over STARTTLS #923

Merged
merged 6 commits into from
Jun 13, 2022

Conversation

jackwotherspoon
Copy link
Contributor

@jackwotherspoon jackwotherspoon commented Jun 10, 2022

Adding direct_tls param that when equal to True alongside the ssl param being set to a ssl.SSLContext will result in a direct SSL connection being made, skipping STARTTLS implementation.

Closes #906

@jackwotherspoon
Copy link
Contributor Author

@elprans would you mind approving the tests workflow for me? Thanks so much! :)

asyncpg/connect_utils.py Outdated Show resolved Hide resolved
@elprans
Copy link
Member

elprans commented Jun 13, 2022

Looks good, please fix test failures. Thanks!

@jackwotherspoon
Copy link
Contributor Author

@elprans updated tests, can you re-run them and see if that fixes them all? Thanks :)

@jackwotherspoon
Copy link
Contributor Author

@elprans sorry about that, didn't see the whitespace errors. Should be resolved now.

@jackwotherspoon
Copy link
Contributor Author

@elprans awesome, looks like the tests are happy! If this is good to get merged, when would the next release be so that pypi could pickup the new changes?

@elprans elprans merged commit f2a937d into MagicStack:master Jun 13, 2022
@elprans
Copy link
Member

elprans commented Jun 13, 2022

I'll look into making a release this or next week.

@jackwotherspoon
Copy link
Contributor Author

@elprans any update on the 0.26.0 release? I have the supporting PR for the Cloud SQL python connector basically ready to go, just need the new version to be released.

Thanks again for all the help on this! Let me know if there is anything else I can help with.

elprans added a commit that referenced this pull request Jul 7, 2022
Changes
-------

* Add support to use awaitable object in password function.   (#889)
  (by @kwarunek in fb3b6bf for #889)

* Support direct TLS connections (i.e. no STARTTLS) (#923)
  (by @jackwotherspoon in f2a937d for #923)

Fixes
-----

* Fix invalid `pyproject.toml` (#900)
  (by @Rongronggg9 in eddb649 for #900)

* Add record_class parameter Pool.fetch and Pool.fetchrow (#896)
  (by @baltitenger in 2519cf3 for #896)

* Domain basetypes are introspected (#886) (#887)
  (by @QuantumTM in cca4a2d for #886)

* Properly handle exceptions raised while handling server auth messages (#862)
  (by @elprans in bd19262 for #862)
elprans added a commit that referenced this pull request Jul 7, 2022
Changes
-------

* Add support to use awaitable object in password function.   (#889)
  (by @kwarunek in fb3b6bf for #889)

* Support direct TLS connections (i.e. no STARTTLS) (#923)
  (by @jackwotherspoon in f2a937d for #923)

Fixes
-----

* Fix invalid `pyproject.toml` (#900)
  (by @Rongronggg9 in eddb649 for #900)

* Add record_class parameter Pool.fetch and Pool.fetchrow (#896)
  (by @baltitenger in 2519cf3 for #896)

* Domain basetypes are introspected (#886) (#887)
  (by @QuantumTM in cca4a2d for #886)

* Properly handle exceptions raised while handling server auth messages (#862)
  (by @elprans in bd19262 for #862)
elprans added a commit that referenced this pull request Jul 7, 2022
Changes
-------

* Add support to use awaitable object in password function.   (#889)
  (by @kwarunek in fb3b6bf for #889)

* Support direct TLS connections (i.e. no STARTTLS) (#923)
  (by @jackwotherspoon in f2a937d for #923)

Fixes
-----

* Fix invalid `pyproject.toml` (#900)
  (by @Rongronggg9 in eddb649 for #900)

* Add record_class parameter Pool.fetch and Pool.fetchrow (#896)
  (by @baltitenger in 2519cf3 for #896)

* Domain basetypes are introspected (#886) (#887)
  (by @QuantumTM in cca4a2d for #886)

* Properly handle exceptions raised while handling server auth messages (#862)
  (by @elprans in bd19262 for #862)
@elprans elprans mentioned this pull request Jul 7, 2022
rohitsanj pushed a commit to noteable-io/asyncpg-crdb-noteable that referenced this pull request May 8, 2023
Adding direct_tls param that when equal to True alongside the ssl param being set to a ssl.SSLContext will result in a direct SSL connection being made, skipping STARTTLS implementation.

Closes MagicStack#906
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.

Support for passing in connection arg or existing SSL connection to asyncpg.connect()
2 participants