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

Connections over SSL? #132

Open
coderfromhere opened this issue Jul 17, 2020 · 5 comments
Open

Connections over SSL? #132

coderfromhere opened this issue Jul 17, 2020 · 5 comments

Comments

@coderfromhere
Copy link

Hi, I wonder how one would have this with hasql?

@nikita-volkov
Copy link
Owner

Hi. I've actually never explored this.

I suggest to consult the "libpq" docs on that part (the C library, that Hasql is built on top of). It's likely you'll be able to achieve what you want by explicitly providing an accordingly formatted bytestring to the acquire function instead of what the settings function produces.

Please post back on how it goes.

@coderfromhere
Copy link
Author

Hi! I'm going to work it out this week as I need it for my org's infra, would you accept a pull request that would extend the current settings struct with an extra field sslmode=disable? It would be equivalent to the current behaviour but more explicitly so.

@nikita-volkov
Copy link
Owner

I suggest to discuss how we can extend the API to provide explicit support for SSL instead.

@coderfromhere
Copy link
Author

ok, I'm going to test this configuration option passed directly to the underlying libpq wrapper as an extended bytestring first.

@mbj
Copy link
Contributor

mbj commented Jul 21, 2020

I can confirm I'm using the sslmode=require or stronger like sslmode=verify-full in production these days. It instructs the libpq do "do the right thing". Its AFAIK transparent from the perspective of hasql.

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

No branches or pull requests

3 participants