Internetzugriff: fehlenden Einrichtungs-Runbook nachgereicht, Pfad-Freigabeliste korrigiert
REVERSE_PROXY.md verwies auf INTERNET_ZUGRIFF_EINRICHTEN.md, das nie geschrieben wurde - jetzt vorhanden (Cloudflare-Konto, Nameserver-Umstellung, Cloudflared/NPM-Add-ons, Pfad-Freigabeliste eintragen, Prüfung). Dabei einen echten Fehler in der Freigabeliste gefunden: sie ging noch von einem companion-app-Web-Build unter /local/dm360/ aus (Planungsstand 2026-08-11) - das wurde nie gebaut, die App ist nativ/sideload-only. Ersetzt durch den tatsächlichen Fernbedarf: das OTA-Bündel unter /audi_dashboard_static/app/* (@capgo/capacitor-updater). Damit genügt auch ein einziger Hostname statt der ursprünglich erwogenen App-/API-Trennung. COMPANION_APP_ARCHITECTURE.md §5 und AGENTS.md entsprechend nachgezogen. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
@@ -302,12 +302,13 @@ never reachable from the public internet. Only a narrow, purpose-built slice of
|
||||
tunnel from the HAOS host (the OptiPlex) to Cloudflare's edge; no router port ever opens. Confirmed
|
||||
capable of routing **multiple public hostnames to multiple local ports/services** — so it points at
|
||||
the reverse-proxy add-on's port below, not at HA's own port 8123.
|
||||
2. **Nginx Proxy Manager or Traefik add-on** — a path-scoped reverse proxy sitting between the tunnel
|
||||
and HA's internal API, on the Supervisor's internal Docker network. Configured with an **allowlist**
|
||||
of only the specific paths the companion app needs (e.g. `/api/states/sensor.audi_*`,
|
||||
`/api/services/pyscript/audi_dashboard_*` — exact path list still TBD, depends on the final entity/
|
||||
service names once the FMM003 mapping is built). Everything else — `/lovelace`, `/config`, `/auth`,
|
||||
the HA frontend itself — is blocked at this layer, never reaching the tunnel at all.
|
||||
2. **Nginx Proxy Manager add-on** (decided, 2026-08-28 — see §5 item 3) — a path-scoped reverse proxy
|
||||
sitting between the tunnel and HA's internal API, on the Supervisor's internal Docker network.
|
||||
Configured with an **allowlist** of only the specific paths the companion app needs (`/api/states/
|
||||
sensor.audi_dashboard_*`, `/api/services/audi_dashboard/*`, plus a handful more — the exact,
|
||||
current list lives in `homeassistant/REVERSE_PROXY.md`, not duplicated here since entity/service
|
||||
names can change and this doc would only go stale again). Everything else — `/lovelace`, `/config`,
|
||||
`/auth`, the HA frontend itself — is blocked at this layer, never reaching the tunnel at all.
|
||||
3. **Auth stays a second, independent layer:** every proxied call still requires the same Bearer LLAT
|
||||
HA's REST API already demands. Even a path that slipped through the allowlist would be useless
|
||||
without that token, and any individual LLAT can be revoked from the HA profile if the phone is ever
|
||||
@@ -333,8 +334,16 @@ surface *is* now internet-facing (even though HA itself never is) — accepted a
|
||||
Deliberately deferred until hardware arrives / the next architecture review — not blocking anything
|
||||
else in this document:
|
||||
|
||||
1. **Exact reverse-proxy path allowlist** — depends on the final pyscript entity/service names once the
|
||||
FMM003 combined-entity mapping is implemented; write these down here once decided.
|
||||
1. ✅ **ERLEDIGT (2026-08-28): reverse-proxy path allowlist defined and current.** Lives in
|
||||
`homeassistant/REVERSE_PROXY.md`, kept in sync with the real entity/service names
|
||||
(`sensor.audi_dashboard_*` / `audi_dashboard.<name>` since the native-integration conversion,
|
||||
`AGENTS.md` §H) rather than duplicated here. The step-by-step setup runbook that applies it in
|
||||
Nginx Proxy Manager is `homeassistant/INTERNET_ZUGRIFF_EINRICHTEN.md`. One correction worth
|
||||
recording: the allowlist originally (2026-08-11 planning) assumed the app itself would be served as
|
||||
a web build under `/local/dm360/` — that was never built. Distribution stayed **native/sideload
|
||||
only** (§1), so the allowlist instead needed the app's own OTA surface
|
||||
(`/audi_dashboard_static/app/*`, the `@capgo/capacitor-updater` bundle) rather than a served
|
||||
web app.
|
||||
2. **No-hardcoding mapping system** for the FMM003 combined entity — discussed in an earlier session,
|
||||
not yet written to a file or finalized in detail. **Kann erst nach der ersten echten
|
||||
MQTT-Nachricht fertig werden** (§2b): die Feldnamen im Codec-JSON sind noch unbekannt und werden
|
||||
@@ -389,9 +398,10 @@ else in this document:
|
||||
Client-Zertifikat, privater Schlüssel) müssen noch in den FMM003-Configurator hochgeladen werden —
|
||||
dabei auf die Dateinamen-Endung achten (siehe Anmerkung oben bei „Dateinamen-Endung ist strikt
|
||||
geprüft").
|
||||
3. **Reverse-proxy add-on: Nginx Proxy Manager vs. Traefik** — both viable (§4), pick deferred to the
|
||||
next audit pass. Doesn't depend on the FMM003 — could be set up and tested against HA's existing API
|
||||
before the hardware arrives, if worth doing ahead of time.
|
||||
3. ✅ **ERLEDIGT (2026-08-28): Nginx Proxy Manager**, not Traefik. Both remained viable per §4; NPM was
|
||||
picked and is what `homeassistant/REVERSE_PROXY.md` and `INTERNET_ZUGRIFF_EINRICHTEN.md` are written
|
||||
against. Setup itself (Cloudflare account, nameserver switch, add-on installation) is still the
|
||||
owner's own action to perform — see the runbook for the exact steps.
|
||||
4. **Cloudflare Tunnel domain** — ✅ **ERLEDIGT: `datametric360.app` ist bei all-inkl registriert**
|
||||
(Stand 2026-08-11). Eigens dafür angelegt, ohne Webseite und ohne Postfach darauf — genau so, wie
|
||||
es die unten stehende Einschränkung verlangt. Vorgesehene Adresse der App später:
|
||||
@@ -407,10 +417,12 @@ else in this document:
|
||||
setup"), gibt es nur im Business-Tarif für 200 $/Monat. Weil auf dieser Domain nichts liegt außer
|
||||
diesem Vorhaben, ist die Umstellung folgenlos.
|
||||
|
||||
Noch zu entscheiden (Kleinigkeit, erst bei der Einrichtung): ob die App unter der Domain selbst
|
||||
liegt und die abgesicherte Schnittstelle unter einer Unteradresse (etwa `api.datametric360.app`),
|
||||
oder umgekehrt. Beides funktioniert; ein getrennter Hostname für die Schnittstelle macht die
|
||||
Pfad-Freigabeliste im Reverse Proxy übersichtlicher.
|
||||
✅ **ERLEDIGT (2026-08-28): ein einziger Hostname genügt**, kein Split nötig. Der ursprüngliche
|
||||
Gedanke (App-Domain vs. API-Subdomain) setzte voraus, dass die App selbst als Web-Build unter einer
|
||||
eigenen Adresse ausgeliefert würde — das wurde nie gebaut (Distribution blieb nativ/sideload, §1).
|
||||
Es gibt nur eine Adresse, die überhaupt gebraucht wird: `https://datametric360.app`, die die App
|
||||
sowohl für API-Aufrufe als auch für ihr eigenes OTA-Bündel verwendet (siehe §5 Punkt 1 oben,
|
||||
`homeassistant/REVERSE_PROXY.md`).
|
||||
|
||||
Die Einschränkung, die zur eigenen Domain geführt hat:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user