Skip to content

Access control (ACL) Basic & Scale ​

ACL policies decide which clients may publish and subscribe to which topics. Without ACL, every client of your organization can use every topic. With ACL on, the broker checks every publish and subscribe against your rules.

Topic access control page

Free plan vs paid plans ​

FreeBasic & Scale
View the ACL pageYesYes
Create, edit and order policiesNoYes (up to 200 policies)
Turn access control onNoYes
Isolation without ACLSeparate credential sets with Publisher / Subscriber permissionsSame, plus per-topic rules

On the Free plan the page shows Access control (ACL) is part of the paid plans with an Upgrade plan button, and the server refuses ACL changes. You can still protect a Free broker by keeping credentials secret, using a separate credential set per device group and deleting credentials you no longer trust. To use per-topic rules, upgrade to Basic or Scale (see pricing); your rules then apply immediately.

Settings ​

SettingMeaning
Access control is on / offThe master switch. You can prepare rules while it is off and turn it on afterwards. When on, unauthorized publishes are rejected with reason code 0x87 (Not authorized).
When no rule matchesAllow or Deny. Deny is the safest: only what you allow is possible.
Web console – Full accessThe console keeps seeing every topic. Untick for strict isolation (then the console is subject to the rules too).

Changes apply to new connections immediately and to connected clients within a minute.

Avoid locking yourself out

If When no rule matches is Deny and no enabled rule allows anything, every device is blocked. The page warns you about this before you save.

Add a policy ​

Click Add ACL Policy.

Add ACL Policy dialog

  1. Template (optional): start from Device writes to its own space, Device listens to its own commands, User can only read or Deny everything else.
  2. What should this rule do? Allow or Deny.
  3. For which action? Publish, Subscribe or Both.
  4. On which topics? A topic filter. + matches exactly one level, # matches everything below (and must be last). Insert the placeholders ${clientid} and ${username} with the buttons below the field.
  5. For whom? Everyone, a Username or a Client ID (a * wildcard is allowed, for example connectmq_client_123456_sensor-*).
  6. Description and more: a description and the Rule enabled switch.

The footer summarizes the rule in plain English (for example User "cmq_abc" can publish on sensors/#). Click Add ACL Policy.

Order matters ​

Policies are evaluated top to bottom; the first matching rule decides. If none matches, When no rule matches decides. Use the arrows to move rules up and down, the switch to disable one, and the pencil to edit it.

Examples ​

Every device writes only to its own branch and reads only its own commands

#DecisionActionTopic filterFor whom
1AllowPublishdevices/${clientid}/#Everyone
2AllowSubscribecommands/${clientid}/#Everyone
3DenyBoth#Everyone

With client ID connectmq_client_123456_sensor-7, the device may publish to devices/connectmq_client_123456_sensor-7/telemetry but not to another device's branch.

A read-only dashboard user

#DecisionActionTopic filterFor whom
1DenyPublish#Username cmq_dashboard
2AllowSubscribeacme/istanbul/#Username cmq_dashboard

One credential set per site

#DecisionActionTopic filterFor whom
1AllowBothacme/istanbul/#Username cmq_istanbul
2AllowBothacme/izmir/#Username cmq_izmir
3DenyBoth#Everyone

Test ACL Policies ​

At the bottom of the page, enter a Username, Client ID, Action (Publish / Subscribe) and Topic. The tester evaluates them exactly like the broker and shows Allowed or Denied with the reason: access control is off, a web console connection, no rule matched (default applied), or Rule #n decided.

Members can view the rules; only owners and admins can change them.

Fully managed MQTT broker for connected devices.