-
-
Notifications
You must be signed in to change notification settings - Fork 98
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: add support for MQTT TLS #241
Conversation
Thank you for this! I will take a look tonight or tomorrow and get it merged in. |
I'm going to close and reopen to see if I can get the diff to update. Right now it's showing old files from beta branch. |
@konturn were you able to test this? I don't see the options for the cert files in the docs for the mqtt package that is being used. Just wanted to confirm this is accurate. https://github.com/mqttjs/MQTT.js#mqttclientstreambuilder-options |
I was able to test on my infrastructure and everything works (you can see the relevant config files in my Infrastructure-as-Code repo here and here). After working with it a bit I realized I didn't need to use client certificates, so my config doesn't specify anything but The docs you linked mention that when MQTT over TLS is used, then the options object is passed through to tls.connect. I did screw up the names for the |
@konturn should we support the ability to pass the key and certs as file paths or were you thinking you would just save the full contents of those into the config? |
@jakowenko would preferably want to pass them as paths and load the data into the vars. I'm seeing now that I'd have to make a further update to allow this, since the tls.connect function takes the file contents. Should I add a function to |
Hey @konturn, sorry for the delay. I refactored the code slightly and updated it to read in the file with You should be able to pass the path of the cert and key now like this. Let me know what you think, and I'll get this built into a beta build this week. mqtt:
host: localhost
tls:
cert: ./client.crt
key: ./client.key |
## [1.13.0-beta.2](v1.13.0-beta.1...v1.13.0-beta.2) (2022-10-20) ### Features * support for MQTT TLS ([#241](#241)) ([7f37b78](7f37b78))
🎉 This PR is included in version 1.13.0-beta.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
## [1.13.0](v1.12.1...v1.13.0) (2022-10-21) ### Features * frigate matches below an area target ([3365bc7](3365bc7)) * **mqtt & api:** total count for person, match, miss, and unknown ([#223](#223)) ([2bf4406](2bf4406)) * support for MQTT TLS ([#241](#241)) ([7f37b78](7f37b78)) ### Bug Fixes * remove non alphanumeric characters from MQTT topic names ([#239](#239)) ([885d8a1](885d8a1))
🎉 This PR is included in version 1.13.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
## [1.13.0](v1.12.1...v1.13.0) (2022-10-21) ### Features * frigate matches below an area target ([3365bc7](3365bc7)) * **mqtt & api:** total count for person, match, miss, and unknown ([#223](#223)) ([2bf4406](2bf4406)) * support for MQTT TLS ([#241](#241)) ([7f37b78](7f37b78)) ### Bug Fixes * remove non alphanumeric characters from MQTT topic names ([#239](#239)) ([885d8a1](885d8a1))
My use-case involves an MQTT broker that uses TLS to communicate--this PR will make this possible.