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:
- Log in to the HiveMQ Cloud Console. select the cluster and click “Manage cluster”
- Go to Access Management → Create Client Credentials.
- Click “Add Client Credentials” and enter a username and password.
- Assign appropriate permissions for the client.
- 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