acl.conf 1.1 KB

123456789101112131415161718192021
  1. %% Broad-Announce M4 ACL. Each user can only publish to its own
  2. %% per-company topic. ingestd can subscribe to ba/+/+/incoming.
  3. %% Default deny at the bottom.
  4. %%
  5. %% Re-read on EMQX SIGHUP (`emqx ctl listeners restart`).
  6. %% See https://docs.emqx.com/en/emqx/v5.10/access-control/acl/acl_file.html
  7. %% ── Sources: publish to their own incoming topic ────────────────
  8. {allow, {username, {re, "^prom-prod-"}}, publish, ["ba/acme-001/prom-prod/incoming"]}.
  9. {allow, {username, {re, "^grafana-"}}, publish, ["ba/globex-002/grafana/incoming"]}.
  10. %% ── ingestd: subscribe to all ba/<co>/<src>/incoming topics ────
  11. {allow, {username, "ingestd"}, subscribe, ["ba/+/+/incoming"]}.
  12. %% ── Loopback: dashboard + same-host debugging. M9 locks this down
  13. %% to dashboard only and adds IP allow-lists. ─────────────────
  14. {allow, {username, "dashboard"}, subscribe, ["$SYS/#"]}.
  15. {allow, {ipaddr, "127.0.0.1"}, all, ["$SYS/#", "#"]}.
  16. %% ── Default deny. Anything not matched above is dropped. ───────
  17. {deny, all, all, ["#"]}.