0
votes

I'm using the Java Paho MQTT client libraries to connect to a server via MQTT.

The libraries have support for TLS/SSL using signed certificates for authentication and encryption.

However, If I am just using a username and password for authentication, as below, and not TLS certificates, will my communication still be encrypted? This I am not sure about.

conOpt = new MqttConnectOptions();
conOpt.setUserName("username");
conOpt.setPassword("password");
1

1 Answers

0
votes

No, username and password (along with any message payloads sent after authentication) are sent in the clear if you have not enabled TLS.