Write Your Broker’s Access Policy
Every broker operation—creating users, deploying Actions, publishing to topics—passes through Rules before it executes. This page is the complete syntax reference for writing those rules: the conditions you can check, the scopes you can target, and the patterns that tie them together.When You Need This Reference
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.On This Page
- Rule Structure — the anatomy of every rule definition
- Conditions — user identity checks, permission checks, and combining logic
- Operation Scopes — every scope category (user, entity, asset, system, log)
- Topic Access Rules — controlling Publish/Subscribe on standard and
$SYStopics - Permission Tags — standard tags and how to use them
- Priority and Evaluation — how the broker picks which rule wins
- Complete Examples — production-ready rule sets for common scenarios
Rule Structure
Every rule follows this structure: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:
This example allows users with the
AllowedUserManagement permission or the root user to create new accounts:
Entity Management
Control who can create and manage LoT entities:
This example restricts Action creation to administrators and the root user:
Asset Management
Control who can manage installed assets (plugins, extensions):
This example allows asset installation only for users with the appropriate permission:
System Operations
Control access to system-level operations:
This example restricts configuration changes to authorized administrators:
Log Management
Control who can manage log traces:
This example allows log trace management for users with logging permissions:
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:
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.
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.

