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

Connecting to postgres over ssl #25

Closed
anirudh-chhangani opened this issue Aug 15, 2016 · 10 comments
Closed

Connecting to postgres over ssl #25

anirudh-chhangani opened this issue Aug 15, 2016 · 10 comments
Assignees

Comments

@anirudh-chhangani
Copy link

Is there any support to connect to postgres over ssl? I am pretty new to asyncio, would appreciate if there is any other way to do this since heroku postgres db's can only be connected over ssl. Thanks

@1st1
Copy link
Member

1st1 commented Aug 16, 2016

We need to add starttls to asyncio & uvloop to do this (I have a patch for that). Another option is to abuse loop.create_connection, I'll have to experiment with that...

@gglanzani
Copy link

Any news on this, or can we help somehow?

@tomas-fp
Copy link

Any new about this? Is there any recommended workaround?

@1st1
Copy link
Member

1st1 commented Jan 12, 2017

I'll look at this next week (feel free to ping me here again). I'll try to copy aiohttp approach to upgrading an asyncio connection to TLS, which seems to be compatible with both Python 3.5 & 3.6.

@1st1 1st1 self-assigned this Jan 12, 2017
@tomas-fp
Copy link

That would be awesome. This is a blocking issue for us.
Also, I'm very open to collaborate with you in the way you consider.

@hanula
Copy link

hanula commented Jan 12, 2017

@tomas-fp for a workaround I used Foreign Data Wrappers to connect using local instance to an external database. Works good enough for my non production stuff.
As for TLS, it seems like only Python 3.6 comes with changes to asyncio that allows implementing it. Full TLS support is supposed to be coming later (can't find source for it now).

[edit] As discussed here: https://bugs.python.org/issue23749

@songololo
Copy link

songololo commented Mar 21, 2017

Looks like the python functionality will land in 3.7:

'It's expected that we'll figure out the API design for starttls during 3.6, so that we can add it in 3.7.'

1st1 added a commit that referenced this issue Apr 4, 2017
1st1 added a commit that referenced this issue Apr 4, 2017
@1st1 1st1 closed this as completed in 5836a8f Apr 4, 2017
@anirudh-chhangani
Copy link
Author

awesome! thanks a lot!

@1st1
Copy link
Member

1st1 commented Apr 4, 2017

It will be shipped as part of asyncpg 0.10.0 later today ;)

@tomas-fp
Copy link

tomas-fp commented Apr 4, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants