-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add SSL support to connection cell #60
Add SSL support to connection cell #60
Conversation
Thank you @msmithstubbs! @wojtekmach, is this enough? Also, maybe myxql and postgrex should be the ones starting ssl? |
|
||
if opts[:ssl] == true do | ||
:ssl.start() | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having a conditional, we should either add startup or not when we generate the code.
Also probably better to call Application.ensure_all_started(:ssl)
:)
MyXQL adds :ssl app: https://github.com/elixir-ecto/myxql/blob/v0.6.3/mix.exs#L24 but Postgrex does not: https://github.com/elixir-ecto/postgrex/blob/v0.17.2/mix.exs#L24 I think we should add :ssl app to Postgrex which I'm happy to do tomorrow. Then we don't need to add setting just |
@msmithstubbs can you please remove the :ssl.start bit? We will ship a new Postgrex and then merge it. :) |
@msmithstubbs Postrgex 0.17.3 is out with the :ssl application already included. Please make this change: - {:postgrex, "~> 0.16.3 or ~> 0.17", optional: true},
+ {:postgrex, "~> 0.16.3 or ~> 0.17.3 or ~> 0.18", optional: true}, and then we will no longer need to manually start :ssl here! |
SSL application is managed by myxql and postgrex
Thank you @wojtekmach, all done. |
💚 💙 💜 💛 ❤️ |
This PR adds toggle to enable SSL connections for Postgres and MySQL
If the toggle is enabled
ssl: true
is passed to the database connection options.Please provide any feedback, in particular on these areas:
:ssl
application to be started which is done by conditionally calling:ssl.start()
. Not sure if there is a better approach here.