Hi Everyone, I’m trying to connect MQTT Transmission to HiveMQ with topic security and finding some issues, so any support would be much appreciated. It seems security is done using a file based extension called RBAC or a database connection using the ESE extension. For initial setup and testing, I'm trying to use RBAC.
My environment is MQTT Transmission, HiveMQ Broker, and MQTT Engine.
Using RBAC, I have a user called engine1 which has full read/write capabilities on all topics (admin role on the rbac file below).
I have another user called tx1 which has access to any topics that start with spBv1.0 (tx1 role on the rbac file below). This would include the spBv1.0/STATE, and spBv1.0/GroupID/EdgeID/DeviceID topics utilized in Sparkplug.
Everything works as expected when both Engine and Transmission are connected using the admin role. Transmission fails when using the tx1 role. Ignition logs are saying the MQTT Transmitter claiming it cannot connect to STATE/PrimaryHostID.
Using MQTT Explorer, I can read/write to the spBv1.0/STATE, and spBv1.0/GroupID/EdgeID/DeviceID topics with the tx1 user.
Once this hurdle is crossed, I do want to create further restrictions on tx1 to say spBv1.0/STATE and spBv1.0/GroupID/#
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<file-rbac>
<users>
<user>
<name>engine1</name>
<password>pass</password>
<roles>
<id>admin</id>
</roles>
</user>
<user>
<name>tx1</name>
<password>pass</password>
<roles>
<id>tx1</id>
</roles>
</user>
</users>
<roles>
<role>
<id>admin</id>
<permissions>
<permission>
<topic>#</topic>
</permission>
</permissions>
</role>
<role>
<id>tx1</id>
<permissions>
<permission>
<topic>spBv1.0/#</topic>
</permission>
</permissions>
</role>
</roles>
</file-rbac>