Initial commit: UlHub workspace

This commit is contained in:
ulhub
2026-07-12 01:09:33 +00:00
commit ed2fae9455
931 changed files with 142973 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
# Certificate CN becomes the MQTT username — restrict each device to its own namespace.
pattern readwrite devices/%u/#
# Admin: brent
user brent
topic readwrite #
topic readwrite $SYS/#
# Admin: admin
user admin
topic readwrite #
topic readwrite $SYS/#
user testuser
topic readwrite #
topic readwrite $SYS/#

View File

@@ -0,0 +1,35 @@
per_listener_settings true
# Plain MQTT — internal services and clients authenticate with username/password on port 1883
listener 1883 0.0.0.0
password_file /mosquitto/config/passwd
acl_file /mosquitto/config/devices.acl
allow_anonymous false
# WebSocket — browser clients, no authentication required
listener 9001 0.0.0.0
protocol websockets
allow_anonymous true
# TLS MQTT — devices authenticate with client certificates (port 8883)
# require_certificate true forces client cert; cert CN becomes the MQTT username.
# ACL restricts each device to devices/<serial_number>/#
# listener 8883 0.0.0.0
# cafile /mosquitto/certs/ca.crt
# certfile /mosquitto/certs/server.crt
# keyfile /mosquitto/certs/server.key
# require_certificate true
# use_identity_as_username true
# allow_anonymous false
# acl_file /mosquitto/config/devices.acl
# TLS MQTT — admin access via username/password, no client cert required (port 8884)
# Connect with CA cert for server verification, then username/password.
# listener 8884 0.0.0.0
# cafile /mosquitto/certs/ca.crt
# certfile /mosquitto/certs/server.crt
# keyfile /mosquitto/certs/server.key
# require_certificate false
# password_file /mosquitto/config/passwd
# allow_anonymous false
# acl_file /mosquitto/config/devices.acl

5
mosquitto/config/passwd Normal file
View File

@@ -0,0 +1,5 @@
brent:$7$101$PPXeFRMHZwxYKE8F$/+qnOjXhFdxQYuiPxFrtVKdDME2ddCogKcOyV/Q/BYdw8UB8LJcfX23ghcVpr8cifK0z6/DZcgo0TORpungMOA==
admin:$7$101$3g0kY+V60o3BKzNi$fphdbnq1TwE7nFTuZHPu86K6619owoIUNZK/w+6iE77utXhgCj/zTRmWoCzCbbvNZRnGLac2PZqdcMGGDXHAWQ==
# Test MQTT user
testuser:$7$101$bKvyrR98MaR7giOp$RcwsxHrBENyVBWSCkzQo0hGA8nLh3CMaTi1GtTpvUzky7D2cReWc68dujesEf+PMh6EWIufl0D4YnPmiAwDSWw==