Updated on 2024-11-06 GMT+08:00

MQTT(S) Secret Authentication

Introduction

MQTT(S) secret authentication requires a device to have its ID and secret for access authentication. For devices connected through MQTTS, a CA certificate must be preconfigured on the devices.

Procedure

Figure 1 MQTT(S) secret authentication process
  1. An application calls the API for creating a device to register a device. Alternatively, a user uses the IoTDA console to register a device.

    During registration, use the MAC address, serial number, or IMEI of the device as the node ID.

  2. The platform allocates a globally unique device ID and secret to the device.

    The secret can be defined during device registration. If no secret is defined, the platform allocates one.

  3. The device needs to integrate the preset CA certificate (only for the authentication process of MQTTS access).
  4. During login, the device sends a connection request carrying the device ID and secret.
  5. If the authentication is successful, the platform returns a success message, and the device is connected to the platform.