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_broker
section. - Locate the
rbacEnabled
parameter and change its value fromfalse
totrue
. - 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
password
with 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 pressTab
after typingjava -jar hivemq-file-rbac-extension-
to cycle through the available versions.Copy the generated hash.
Open the
united-manufacturing-hub-hivemqce-extension
ConfigMap.Replace the password hash with the one generated in step 3.
Save the changes.