How to authorize and authenticate broker for secure access

How to authorize and authenticate broker for secure access using username and password for websocket connection.

Hello @lakshay

Thank you for your question. Could you please specify which HiveMQ broker you are using—HiveMQ Cloud, HiveMQ Enterprise, or HiveMQ Community Edition?

  • For HiveMQ Cloud, you can add username-password authentication by following these steps:
    1. Log in to the HiveMQ Cloud Console. select the cluster and click “Manage cluster”
    2. Go to Access ManagementCreate Client Credentials.
    3. Click “Add Client Credentials” and enter a username and password.
    4. Assign appropriate permissions for the client.
    5. Use these credentials in your MQTT WebSocket client to authenticate.
  • For an open-source solution (HiveMQ Community Edition), you can use the HiveMQ File RBAC Extension to authenticate and authorize clients using a username and password.
  • For HiveMQ Enterprise, the HiveMQ Enterprise Security Extension supports file realm for authentication and authorization. Please check our documentation for more details.

Please take a look and feel free to reach us in case of any questions.

Regards,
Sheetal from HiveMQ Team