-
Notifications
You must be signed in to change notification settings - Fork 443
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
CLI WSS auth using Client + Cert does not work, but Username + Password does #1663
Comments
Thank you for your feedback. We have confirmed that this is a bug and it will be fixed in the next version. |
This bug has already been addressed in a recent Pull Request. We will roll out the updated version as promptly as possible. |
Thank you team, this is great news. Is it expected that I wait until release is available to close this issue? Or do you close? |
We will test after the release and close the issue once it's confirmed that there are no problems. v1.10.0 will be come soon. |
I built from main 19d4e69 and confirmed that issue is resolved. |
Updated to https://github.com/emqx/MQTTX/releases/tag/v1.10.0. Thanks for your feedback. |
What did I do
I am trying to use CLI to connect to MQTT via WSS with client certificate & key. The same options work in GUI, but not with the CLI. When I use --debug I can see that CLI has some logic where it thinks protocol is mqtts even if I specify protocol as WSS.
What happened
Note: I am trying this with my internal MQTT broker. I am using broker.emqx.io just as example.
✅ Works (Username + Password)
mqttx conn --debug --mqtt-version 3.1.1 --protocol "wss" --insecure -h "broker.emqx.io" -p 8084 --client-id "ThisWillWork" -u "user" -P "pass"
❌ Does not work (Key + Cert + CA)
mqttx conn --debug --mqtt-version 3.1.1 --protocol "wss" --insecure -h "broker.emqx.io" -p 8084 --client-id "ThisWillNotWork" --key "C:\Temp\client.key" --cert "C:\Temp\client.pem" --ca "C:\Temp\server.pem"
Expected
I expect that I can use WSS and certificate based authentication to connect / subscribe / publish, which works in the GUI.
Environment
More detail
CLI Debug when using Cert + Key. Notice protocol = mqtts on second line
CLI when using username + password. Notice the second line indicates 'wss' and correctly forms the URI
wss://broker.emqx.io:8084/mqtt
The text was updated successfully, but these errors were encountered: