Skip to content

Commit c1a0c90

Browse files
committed
Change auth
1 parent 23b131b commit c1a0c90

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/iot-operations/manage-mqtt-broker/howto-test-connection.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ The first option is to connect from within the cluster. This option uses the def
8787
1. Inside the pod's shell, run the following command to publish a message to the broker:
8888

8989
```console
90-
mosquitto_pub --host aio-mq-dmqtt-frontend --port 8883 --message "hello" --topic "world" --username '$sat' --pw $(cat /var/run/secrets/tokens/mq-sat) --debug --cafile /var/run/certs/ca.crt
90+
mosquitto_pub --host aio-mq-dmqtt-frontend --port 8883 --message "hello" --topic "world" --debug --cafile /var/run/certs/ca.crt -D CONNECT authentication-method 'K8S-SAT' -D CONNECT authentication-data $(cat /var/run/secrets/tokens/mq-sat)
9191
```
9292

9393
The output should look similar to the following:
@@ -104,7 +104,7 @@ The first option is to connect from within the cluster. This option uses the def
104104
1. To subscribe to the topic, run the following command:
105105

106106
```console
107-
mosquitto_sub --host aio-mq-dmqtt-frontend --port 8883 --topic "world" --username '$sat' --pw $(cat /var/run/secrets/tokens/mq-sat) --debug --cafile /var/run/certs/ca.crt
107+
mosquitto_sub --host aio-mq-dmqtt-frontend --port 8883 --topic "world" --debug --cafile /var/run/certs/ca.crt -D CONNECT authentication-method 'K8S-SAT' -D CONNECT authentication-data $(cat /var/run/secrets/tokens/mq-sat)
108108
```
109109

110110
The output should look similar to the following:
@@ -125,7 +125,7 @@ The first option is to connect from within the cluster. This option uses the def
125125
> Using `--insecure` is not recommended for production scenarios. Only use it for testing or development purposes.
126126

127127
```console
128-
mqttui --broker mqtts://aio-mq-dmqtt-frontend:8883 --username '$sat' --password $(cat /var/run/secrets/tokens/mq-sat) --insecure
128+
mqttui --broker mqtts://aio-mq-dmqtt-frontend:8883 --insecure -D CONNECT authentication-method 'K8S-SAT' -D CONNECT authentication-data $(cat /var/run/secrets/tokens/mq-sat)
129129
```
130130

131131
1. To remove the pod, run `kubectl delete pod mqtt-client -n azure-iot-operations`.

0 commit comments

Comments
 (0)