ACL - Groups
Groups are collections of MQTT clients that share a common set of role-based permissions. Instead of assigning the same roles to dozens of individual clients, you assign roles to a group and then add clients to that group. Every client in the group automatically inherits those permissions.
What Groups Are
A group is a logical container for clients. Its primary purpose is permission inheritance: any role assigned to a group is automatically applied to every client that belongs to that group.
Groups work alongside direct role assignments. A client's effective permissions are the union of:
- Roles assigned directly to the client
- Roles assigned to each group the client belongs to
This gives you flexible layering: use groups for broad, shared policies and direct role assignments for client-specific exceptions.
Creating a Group
- Navigate to ACL > Groups in the sidebar.
- Click Add Group.
- Enter a Group Name - use something descriptive like
sensors,actuators, ormonitoring-tools. - Click Save.
The group is created empty with no members and no roles.
Adding Clients to a Group
There are two ways to add a client to a group:
From the Group page:
- Open the group in ACL > Groups.
- Click Add Client.
- Select the client from the dropdown.
- Click Save.
From the Client page:
- Open the client in ACL > Clients.
- Click Add to Group.
- Select the group.
- Click Save.
Both approaches produce the same result. The client immediately inherits all roles assigned to the group.
Assigning Roles to a Group
- Open the group in ACL > Groups.
- Click Add Role.
- Select the role from the dropdown.
- Optionally set a priority for this role assignment (see Priority section below).
- Click Save.
All clients currently in the group immediately gain the permissions defined in that role. Any clients added to the group in the future will also inherit this role automatically.
Removing Clients from a Group
- Open the group in ACL > Groups.
- Find the client in the Members list.
- Click the Remove button next to the client.
- Confirm the action.
The client immediately loses any permissions it was inheriting from this group (unless it has those same permissions through another group or direct role assignment).
Deleting a Group
- Go to ACL > Groups.
- Find the group and click Delete.
- Confirm the deletion.
Deleting a group removes all its role assignments and removes all clients from it. The clients themselves are not deleted - they remain in your ACL client list but lose the permissions that came from this group.
Permission Inheritance Model
A client's full permission set is built by combining permissions from all sources:
Client Effective Permissions =
(Direct role assignments to client)
+ (Roles from Group A)
+ (Roles from Group B)
+ (Roles from Group C)
...
When the broker evaluates whether a client can publish or subscribe to a topic, it checks all of these combined rules, applying priorities to resolve any conflicts.
Example:
- Client
sensor-01is in groupsensorsand groupbeta-testers sensorsgroup has rolesensor-read-only(can publish tosensor/#)beta-testersgroup has rolebeta-topics(can publish tobeta/#)sensor-01also has rolealert-publisherdirectly assigned (can publish toalerts/#)
sensor-01 can publish to sensor/#, beta/#, and alerts/#.
Priority Setting on Group Assignments
When you assign a role to a group, you can set a priority. Priority determines the order in which rules from different role sources are evaluated when a client belongs to multiple groups.
- Higher priority values are evaluated first.
- The first matching rule wins.
- Use priority to ensure that more specific (higher priority) rules take effect before broader (lower priority) ones.
For most setups, you do not need to change the default priority. It matters when you have deny rules in some roles that need to override allow rules in others.
Practical Use Cases
IoT sensor fleet
Create a sensors group with a sensor-publish role that allows publishing to sensor/#. Add all your sensor clients to this group. When you add a new sensor device, just create a client and add it to the sensors group - no need to configure roles per device.
Actuator group
Create an actuators group with an actuator-command role that allows subscribing to actuator/#/command and publishing to actuator/#/status. All actuator devices get their permissions from this group.
Monitoring and dashboards
Create a monitoring group with a read-all role that allows subscribing to #. Add all your dashboard clients and monitoring tools to this group. They can observe all traffic without being able to publish.
Environment-based access
Create separate groups for production-clients and staging-clients with different topic namespaces. Production clients publish to prod/# and staging clients publish to staging/#. Same role structure, different groups, clean separation.
Hierarchical access
Use groups to implement multi-tier access:
- base-sensors group: publish to sensor/#
- privileged-sensors group: publish to sensor/# plus subscribe to config/sensor/#
A client can belong to both groups and accumulate permissions from each.