Fix inaccuracies in UPGRADING.md: move MQTT creds to update section, add Python defaults note, document received_at rename

This commit is contained in:
Louis King
2026-04-14 22:53:08 +01:00
parent 1e4a75f074
commit 0427378a18
+5 -10
View File
@@ -204,6 +204,10 @@ MQTT_WS_PORT=9001
|----------|-----------|-----------|-------|
| `MQTT_TRANSPORT` | `tcp` | `websockets` | Required by the new JWT-based broker |
| `MQTT_WS_PATH` | `/mqtt` | `/` | New broker accepts connections on `/` |
| `MQTT_USERNAME` | (empty/optional) | Subscriber username | Now **required** for collector subscriber auth. Set to match your broker's `SUBSCRIBER_1` config. |
| `MQTT_PASSWORD` | (empty/optional) | Subscriber password | Now **required** for collector subscriber auth. Generate a secure password: `openssl rand -base64 32` |
> **Note:** The Python-level defaults for `MQTT_TRANSPORT` and `MQTT_WS_PATH` remain `tcp` and `/mqtt` respectively. The new values above are set in `.env.example` and `docker-compose.yml`, which override the Python defaults for Docker deployments. Non-Docker users must set these environment variables explicitly.
### Variables to Add
@@ -211,15 +215,6 @@ MQTT_WS_PORT=9001
# Docker Compose project name (container and volume prefix)
COMPOSE_PROJECT_NAME=hub-dev
# MQTT subscriber authentication for the collector
# The collector connects as a subscriber to read all published topics
# including /internal. Set these to match your broker's SUBSCRIBER_1 config.
MQTT_USERNAME=subscriber
# Generate a secure password (do not use a simple password in production):
# openssl rand -base64 32
MQTT_PASSWORD=<generate-a-secure-password>
# JWT audience claim for packet capture authentication tokens
# Must match AUTH_EXPECTED_AUDIENCE on the broker
MQTT_TOKEN_AUDIENCE=mqtt.localhost
@@ -234,7 +229,7 @@ All other `PACKETCAPTURE_*` variables have sensible defaults in `docker-compose.
## Step 6: Run Database Migration
The migration renames `receiver_node_id``observer_node_id` across all event tables and `event_receivers``event_observers`:
The migration renames `receiver_node_id``observer_node_id` across all event tables, `event_receivers``event_observers`, and `received_at``observed_at` in the event observers table:
```bash
docker compose -f docker-compose.yml -f docker-compose.dev.yml --profile core run --rm db-migrate