Hive mq ce deployment, how to setup username and password

we have install hivemq community edition using docker.

#docker run --name hivemq-ce -d -p 1883:1883 hivemq/hivemq-ce

so, could you please help us in setting up the username and password for the below

con -i client -h abc.com

we have setup username and password under config.xml

config.xml

<?xml version="1.0"?> 1883 0.0.0.0 8000 0.0.0.0 /mqtt my-websocket-listener mqttv3.1 mqtt true tib tib@123 root@abe16fd898d3:/opt/hivemq-ce-2024.1/conf#

→ in mqtt cli
we are executing as below
mqtt> con -i client -h qamqtt.tibchannels.com → but still it does not ask for username and password

Hi @raheem12

Welcome to the HiveMQ Community! We are delighted to see your interest in MQTT and the HiveMQ broker, and we sincerely appreciate your participation in our community.

If you are seeking to implement simple authentication (username and password) for MQTT clients, particularly those connecting to the broker using mqtt-cli, you’ll need to install a Security Extension. A great option is the open-source HiveMQ File RBAC Extension, available for download at HiveMQ Extension - File RBAC. Comprehensive configuration instructions can be found at GitHub - hivemq/hivemq-file-rbac-extension: HiveMQ extension for managing role-based authorization.

Should you have any questions or require further assistance, please feel free to reach out. We’re here to help and look forward to supporting you in your MQTT journey.

Best regards,
Dasha from HiveMQ Team

Dear Team,

Thank you so much for the reply, it worked.

But when i connect without username and password, it should not connect but it gets connected. how to resolve this issue?

So we want to connect with only username and password and not without it. Could you please help me here.

mqtt> con -h abc.com -i client
client@abc.com>

Thanks & Regards,
Mohammed.Raheem

Hi @raheem12

Check the directory $HIVEMQ_HOME/extensions/hivemq-allow-all-extension. If there is no file with the filename "DISABLED" in the directory, the extension is enabled and any client can authenticate. To disable the extension, create the file with the filename "DISABLED" in the directory.
Documentation: https://docs.hivemq.com/hivemq/latest/extensions/general.html#enable-disable-extensions

cd $HIVEMQ_HOME/extensions/hivemq-allow-all-extension
touch DISABLED

Watch the hivemq.log for the message:

INFO  - Extension "Allow All Extension" version 1.0.0 stopped successfully.

Then test your mqtt client again.
I hope it helps.
Dasha from HiveMQ Team

Dear Team,

There is one more query.

https://www.hivemq.com/demos/websocket-client/ → while connecting through web socket

host: qa.com
port: 1883
ClientID: what should be clienID , from where should i pick it
username: abc
password: abc@123

Could you please help in setting ClienID

when connecting through mqtt cli it will not ask for ClienID

Thanks & Regards,
Mohammed.Raheem

Hi @raheem12

Thank you for reaching out with your question. When connecting to an MQTT broker using the MQTT-CLI client, the Client ID is specified with the -i (--identifier) option, as you’ve correctly pointed out in your example:

In your example, you have set the Client ID = “client”.

I hope this clarifies your query. Should you have any further questions or need additional assistance, please don’t hesitate to let us know.

Best regards,
Dasha from HiveMQ Team

Hi Team,

i was using docker setup for hivemq , what is the websocket port . how to enable the websocket . is it 8000 port ?

could you please help me in this regard.

docker run --name hivemq-ce -e HIVEMQ_LOG_LEVEL=INFO -d -p 1883:1883 hivemq/hivemq-ce

Thanks & Regards,
Mohammed.Raheem

Dear Team,

I have configured hivemq-ce setup using docker , could you please help in setting up the SSL for this and let me know the steps to be followed.

Awaiting for your reply on priority.

Thanks & Regards,
Mohammed.Raheem

Dear Team,

Could you please update.

Thanks & Regards,
Mohammed.Raheem

Dear Team,

Could you please help me in enabling SSL in hivemq

Thanks & Regards,
Mohammed.Raheem

Hello @raheem12

Thank you for reaching out. Please check our documentation to set <tls-tcp-listener> to enable SSL.
We also have documentation about how to generate self signed certificates. Please take a look and feel free to reach us in case you need further help.

Regards,
Sheetal from HiveMQ Team

Dear Sheetal/Team,

Thank you for helping me with the documentation, but there is till confusion on mqttx tool. After configuring, i have selected wss:// but still am not able to connect

could you please help me here in setting up i have done all the configuration related to it in final stage.

i can join the meeting if shared the link

Thanks & Regards,
Mohammed.Raheem

Hello @raheem12

We’d be happy to assist you further with troubleshooting the WSS connection issue.

To better understand the problem and provide you with appropriate assistance, could you please provide more details about what error you observed and the configurations you’ve set up in MQTT.fx? Screenshots of the configurations would be particularly helpful in identifying any potential issues.

Are you able to test the same with MQTT CLI?

Additionally, if possible, could you please share the hivemq config.xml file? This will allow me to review the configurations and provide guidance.

Looking forward to hearing from you.

Regards,
Sheetal from the HiveMQ team

Yes, i have shared the details over mail. please check and revert