Enabling RBAC for MQTT Broker
less than a minute
Before you begin
You need to have a UMH cluster. If you do not already have a cluster, you can create one by using the Management Console .
Enabling RBAC
- Go to the Releases tab in UMHLens / OpenLens.
- Select the release and click Upgrade. This opens the values file.
- Find the
mqtt_brokersection. - Locate the
rbacEnabledparameter and change its value fromfalsetotrue. - Click Upgrade.
Now all MQTT connections require password authentication with the following defaults:
- Username:
node-red - Password:
INSECURE_INSECURE_INSECURE
Changing the default credentials
Open the shell of the HiveMQ pod in UMHLens / OpenLens.
Navigate to the installation directory of the RBAC extension.
cd extensions/hivemq-file-rbac-extension/Generate a password hash with this command.
java -jar hivemq-file-rbac-extension-<version>.jar -p <password>Please replace
passwordwith your desired password without any whitespaces, and replace the version of the HiveMQ CE extension withversion. If you’re not sure which version is installed, you can pressTabafter typingjava -jar hivemq-file-rbac-extension-to cycle through the available versions.Copy the generated hash.
Open the
united-manufacturing-hub-hivemqce-extensionConfigMap.Replace the password hash with the one generated in step 3.
Save the changes.
