Deploying rules: In a LoT Notebook, just write the rule and run the cell—the extension handles the rest. For MQTT clients, use the
-addRule broker command.Rule Structure
Every rule follows this structure:| Component | Description |
|---|---|
RuleName | Unique identifier for the rule |
PRIORITY | Evaluation order (lower numbers = higher priority) |
Scope | The operation type this rule controls |
TO TOPIC | Optional topic pattern for Publish/Subscribe rules |
condition | Logic that determines access (user checks, permissions) |
Conditions
Rules evaluate conditions to decide whether to ALLOW or DENY an operation.User Identity Checks
Check if the current user matches a specific username:Permission Checks
Check if the user has a specific permission tag:Combining Conditions
UseOR and AND to create complex conditions:
Operation Scopes
Rules control different categories of operations. Each scope targets specific broker functionality.User Management
Control who can manage broker users:| Scope | Controls |
|---|---|
UserManagementCreation | Creating new users |
UserManagementRemove | Deleting users |
UserManagementUpdate | Modifying user parameters |
UserManagementPasswordChange | Changing user passwords |
AllowedUserManagement permission or the root user to create new accounts:
Entity Management
Control who can create and manage LoT entities:| Scope | Controls |
|---|---|
ActionManagementCreation | Creating Actions |
ActionManagementRemove | Deleting Actions |
ActionManagementRun | Manually running Actions |
ModelManagementCreation | Creating Models |
ModelManagementRemove | Deleting Models |
RouteManagementCreation | Creating Routes |
RouteManagementRemove | Deleting Routes |
RuleManagementCreation | Creating Rules |
RuleManagementRemove | Deleting Rules |
Asset Management
Control who can manage installed assets (plugins, extensions):| Scope | Controls |
|---|---|
AssetManagementCreation | Installing assets |
AssetManagementRemove | Uninstalling assets |
AssetManagementStart | Starting assets |
AssetManagementStop | Stopping assets |
AssetManagementPolicySet | Setting asset policies |
System Operations
Control access to system-level operations:| Scope | Controls |
|---|---|
SystemConfiguration | Changing broker configuration |
ShellCommand | Executing shell commands |
CommandCall | Calling broker commands |
Log Management
Control who can manage log traces:| Scope | Controls |
|---|---|
LogManagementCreation | Creating log traces |
LogManagementRemove | Deleting log traces |
LogManagementUpdate | Modifying log traces |
Topic Access Rules
Control who can publish to or subscribe from specific MQTT topics.Standard Topics
UsePublish and Subscribe with TO TOPIC to control access:
System Topics ($SYS)
UsePublishSys and SubscribeSys for system topic access:
Permission Tags
Permission tags are assigned to users and checked withUSER HAS. These are the standard permission tags:
| Permission Tag | Grants Access To |
|---|---|
AllowedUserManagement | User creation, removal, updates |
AllowedSystemConfiguration | System config, rules, shell commands |
AllowedAssetManipulation | Asset install, start, stop, policies |
AllowedLogManagement | Log trace creation, removal, updates |
AllowedModelManagement | Model creation and removal |
You can define custom permission tags for your organization. Assign them to users through the broker’s user management system.
Priority and Evaluation
Rules are evaluated in priority order (lower number = higher priority). The first matching rule determines the outcome.Complete Examples
- Multi-User Environment
- IoT Device Access
- Department Isolation
A typical production setup with role-based access control:
Best Practices
Start with deny-by-default
Start with deny-by-default
Create restrictive rules first, then add specific allow rules for authorized users. This prevents accidental access.
Use permission tags over usernames
Use permission tags over usernames
Protect $SYS topics
Protect $SYS topics
Always restrict access to
$SYS/# topics. These contain broker commands and sensitive system information.Document your rules
Document your rules
Use clear, descriptive rule names that explain their purpose.
AllowAdminActionCreation is better than Rule1.Next Steps
Actions Guide
Build event-driven automation with Actions.
Models Guide
Structure your MQTT data with Models.

