No description
Find a file
jtricerolph 0bdfe67bf5 Add self-service MQTT Broker Clients management
New /settings/api/mqtt-clients routes (list/create/revoke/delete) manage
per-consumer dynamic-security identities on the shared broker (LXC 104) —
name + topic scope + publish/subscribe flags in, generated username/password
out (shown once, never stored). Replaces manually running mosquitto_ctrl
over SSH by hand for every new device or app that needs broker access.

Implementation SSHs into the broker LXC and runs mosquitto_ctrl inside a
throwaway container on its Docker network (src/lib/ssh.js + mqtt-dynsec.js)
rather than reimplementing the dynamic-security plugin's JSON wire protocol
from scratch — reuses the exact commands verified by hand while wiring up
the water-softener and mqtt-inspector clients this session. Needs the
shared deploy SSH key mounted (Dockerfile/compose changes) and
MQTT_ADMIN_USER/PASS threaded in via stack-init.

mqtt_clients table is bookkeeping only (name/scope/active) — the broker's
own dynamic-security.json remains the source of truth for auth.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-28 17:11:35 +00:00
src Add self-service MQTT Broker Clients management 2026-07-28 17:11:35 +00:00
.env.example Initial settings service 2026-07-01 18:56:19 +00:00
.gitignore Add MQTT Broker integration (config UI + connection test) 2026-07-28 14:58:53 +00:00
docker-compose.yml Add self-service MQTT Broker Clients management 2026-07-28 17:11:35 +00:00
Dockerfile Add self-service MQTT Broker Clients management 2026-07-28 17:11:35 +00:00
package-lock.json Add MQTT Broker integration (config UI + connection test) 2026-07-28 14:58:53 +00:00
package.json Add MQTT Broker integration (config UI + connection test) 2026-07-28 14:58:53 +00:00