Skip to content

Add TLS cert configuration options for listeners on docker configs #473

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kevinta893
Copy link

Added some changes to enable secure websocket, mqtt, and http by adding certificate configs in the options files for Docker. Both JSON and YAML are enabled.

Sorry, I am not very familiar with GO so pardon my coding style for it.

I followed the examples/tls/main.go file and generalized it for all listener types. You can even specify different certificates and keys per listener endpoint. tls_cert is an optional config so if someone wanted both mqtt and mqtts or ws and wss, they can do so on separate ports.

I have a few things I'm not so sure about and would like some feedback on:

  1. I have tested the config with TCP (mqtts), Websockets (wss), the Health check (https), and the SysInfo (https), but does it make sense to load the certificate for Unix Sockets and the Mock Listener? (haven't worked with Unix Sockets)
  2. Objections to the name tls_cert? I figure it would be best to separate them from the existing field tlsConfig. I originally had it as simply ssl but not sure if the distinction would be confusing.
  3. I also have not the experience with CA certs, so for now I think I'll leave it as is and let someone else contribute to it. Though I can see it reasonably extended in the tls_config

Thank you

Related Issues:
https://github.com/orgs/mochi-mqtt/discussions/419
#423

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.

1 participant