I’m using HiveMQ Swarm in k8s via Helm using the official repo on github.
Story:
As my HiveMQ Cluster is running in the same k8s cluster in a different namespace is using TLS 1.2, Authentication with RBAC extension. I want the same for my Swarm instances to authenticate correctly before executing my scenarios. Anyway, the certs a self-signed and the connection is tested using python (paho mqtt), MQTTx and MQTT.fx (java) clients.
Behavior:
Swam is trying to connect but has no chance to execute the scenario correctly as there’s no option to specify self-signed certs. I always need to set the trust-store.jks and client.jks.
The connection gets aborted with message 2022-09-01 21:49:13,090 ERROR - client-00011: connection timed out before receiving CONNACK after 60s
tl;dr
Is there a way to enable a flag like self-signed certificates allowed or similar? The docu is not helpful but wrong in some points.
We understand that you are already in contact with Peter from our sales team working on this topic together and in active conversation to resolve the issue.
Peter will reach out to you regarding the next steps.
Wishing you a nice day ahead,
Kind regards
Dasha from HiveMQ team
Download the script cetly.sh to generate key- and trust-stores (find the link below).
Download the Keystore-manager.jar(find the link below). This Keystore-manager.jar is a Swarm extension that implements a customized security provider.
scenario.xml - the sample Swarm scenario (find xml below)
copy the .jar into $HIVEMQ_HOME/tools/hivemq-swarm/extensions/
create a subdirectory $HIVEMQ_HOME/tools/hivemq-swarm/scenario-dependencies/stores/01/
run the certly.sh script (it will generate several files in the same dir)
copy the following files to the $HIVEMQ_HOME/conf/ broker-truststore.jks broker-keystore.jks
copy the following files to $HIVEMQ_HOME/tools/hivemq-swarm/scenario-dependencies/stores/01/ client-keystore.jks and rename to client.jks client-truststore.jks and rename 'client-truststore.jks' to 'truststore.jks'
create 3 text files with the password “changeme” inside (echo changeme > key-store-password)
1. key-store-password
2. private-key-password
3. trust-store-password
Configure a TLS listener in the $HIVEMQ_HOME/conf/config.xml: