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

Add support for MQTT SSL #140

Merged
merged 3 commits into from
Sep 8, 2019
Merged

Add support for MQTT SSL #140

merged 3 commits into from
Sep 8, 2019

Conversation

virtualm2000
Copy link
Contributor

I have a linux container install for TeslaMate and I also have a separate MQTT broker which uses SSL connection.
I have added an ENV var MQTT_SSL as true/false to specify if MQTT connection is using SSL or not.

Please feel free to make the proper corrections as this is my first attempt at Elixir.

Best regards,
Mihai

@adriankumpf
Copy link
Collaborator

Awesome! Thank you. I will look into it soon.

password: Keyword.get(auth, :password),
server:
{Tortoise.Transport.SSL,
host: Keyword.get(auth, :host), port: 8883, verify: :verify_none},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think one would expect security be default i.e. certificates should be verified when MQTT_SSL is enabled.

Do you use a self-signed certificate? Or could we add a CA store with the :cacertfile option?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I use a self-signed certificate, hence the verify_none option. But a CA store option would work as well.

Copy link
Collaborator

@adriankumpf adriankumpf Sep 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha! Then let's add a CA store and make:verify_none optional e.g. with another env var? I'll try to integrate https://github.com/ericmj/castore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect! Looking forward to test.

Thanks!

@adriankumpf adriankumpf merged commit b1ffa97 into teslamate-org:master Sep 8, 2019
@adriankumpf
Copy link
Collaborator

Make sure to check the box to allow commits from me on your PRs in the future. I'll add the CA store after merging. Thanks!

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.

2 participants