fix: address critical security issues discovered during code review
All checks were successful
CI / build (pull_request) Successful in 1m16s
All checks were successful
CI / build (pull_request) Successful in 1m16s
This commit is contained in:
parent
e0b2750c2e
commit
671da31605
7 changed files with 417 additions and 0 deletions
|
|
@ -0,0 +1,53 @@
|
|||
<h2>Voorgestelde Flow: De "Server-as-Broker" methode</h2>
|
||||
<p class="subtitle">Gebruik de SylDa_Server als ontmoetingsplaats voor versie-informatie</p>
|
||||
|
||||
<div class="mockup">
|
||||
<div class="mockup-header">Interactie Diagram</div>
|
||||
<div class="mockup-body" style="background: #1e1e1e; color: #d4d4d4; padding: 20px; font-family: monospace; line-height: 1.4;">
|
||||
<div style="margin-bottom: 10px; color: #569cd6;">// 1. Client meldt zich aan</div>
|
||||
[Client] --(Write version: "5")--> [Server: ClientStatusChar]
|
||||
[Client] --(Subscribe)------------> [Server: ClientControlChar]
|
||||
|
||||
<div style="margin-top: 20px; margin-bottom: 10px; color: #569cd6;">// 2. App checkt status</div>
|
||||
[App] --(Read ClientStatus)----> [Server]
|
||||
<span style="color: #ce9178;">App denkt: "Client heeft v5, ik heb v6. Update nodig!"</span>
|
||||
|
||||
<div style="margin-top: 20px; margin-bottom: 10px; color: #569cd6;">// 3. App start de dans</div>
|
||||
[App] --(Write: "START_OTA")---> [Server: ClientControlChar]
|
||||
[Server] --(Notify)---------------> [Client]
|
||||
|
||||
<div style="margin-top: 20px; margin-bottom: 10px; color: #569cd6;">// 4. De wissel</div>
|
||||
<span style="color: #4ec9b0;">Client disconnect van Server -> Start Advertising</span>
|
||||
<span style="color: #4ec9b0;">App disconnect van Server -> Scant naar Client OTA</span>
|
||||
|
||||
<div style="margin-top: 20px; margin-bottom: 10px; color: #569cd6;">// 5. De eigenlijke OTA</div>
|
||||
[App] --(Direct BLE OTA)-------> [Client (nu in Server mode)]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h3>Technische details om te bespreken:</h3>
|
||||
<div class="options" data-multiselect>
|
||||
<div class="option" data-choice="uuid-tracking" onclick="toggleSelect(this)">
|
||||
<div class="letter">1</div>
|
||||
<div class="content">
|
||||
<h3>UUID Tracking</h3>
|
||||
<p>Aangezien de Server 2 clients ondersteunt, moet de Server de versie per UUID opslaan zodat de App weet welke client welke versie heeft.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="option" data-choice="auth" onclick="toggleSelect(this)">
|
||||
<div class="letter">2</div>
|
||||
<div class="content">
|
||||
<h3>Beveiliging (HMAC/AES)</h3>
|
||||
<p>Moet de "START_OTA" opdracht ook versleuteld zijn? (Waarschijnlijk wel, om te voorkomen dat een vreemde de clients platlegt).</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="option" data-choice="reconnect" onclick="toggleSelect(this)">
|
||||
<div class="letter">3</div>
|
||||
<div class="content">
|
||||
<h3>Auto-reconnect</h3>
|
||||
<p>Na de update (of bij falen/timeout) moet de Client weer terug in zijn normale rol vallen en de Server zoeken.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<h2>Ontwerpkeuzes BLE OTA voor de Client</h2>
|
||||
<p class="subtitle">Hoe krijgt de Client (ESP32) de nieuwe firmware?</p>
|
||||
|
||||
<div class="options">
|
||||
<div class="option" data-choice="android-direct" onclick="toggleSelect(this)">
|
||||
<div class="letter">A</div>
|
||||
<div class="content">
|
||||
<h3>Android App Direct</h3>
|
||||
<p>De Client ESP32 start een tijdelijke BLE Server (OTA Service). De Android app verbindt direct met de Client om de firmware te pushen.</p>
|
||||
<div class="label">Voordeel: Simpel, hergebruikt Android OTA code.</div>
|
||||
<div class="label">Nadeel: Handmatige actie nodig op Client (bijv. knop indrukken).</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="option" data-choice="server-proxy" onclick="toggleSelect(this)">
|
||||
<div class="letter">B</div>
|
||||
<div class="content">
|
||||
<h3>Server Proxy / Relay</h3>
|
||||
<p>De Android app stuurt de firmware naar de SylDa_Server. De Server stuurt het door naar de Client via de bestaande BLE verbinding.</p>
|
||||
<div class="label">Voordeel: Geen directe verbinding Android-Client nodig.</div>
|
||||
<div class="label">Nadeel: Complexer, Server moet grote buffers hebben of flow control.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="option" data-choice="client-pull" onclick="toggleSelect(this)">
|
||||
<div class="letter">C</div>
|
||||
<div class="content">
|
||||
<h3>Client Pull (via Server)</h3>
|
||||
<p>De Server kondigt een update aan. De Client haalt de firmware "chunks" op bij de Server via een nieuwe OTA service op de Server.</p>
|
||||
<div class="label">Voordeel: Client heeft controle over tempo.</div>
|
||||
<div class="label">Nadeel: Server moet de firmware ergens opslaan (Flash/NVS/SPIFFS?) voordat hij het kan doorgeven.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h3>Huidige Situatie</h3>
|
||||
<div class="mockup">
|
||||
<div class="mockup-header">Architectuur</div>
|
||||
<div class="mockup-body">
|
||||
<pre>
|
||||
[Android App] --(BLE OTA)--> [SylDa_Server (ESP32)]
|
||||
|
|
||||
? --(BLE OTA?)--> [SylDa_Client (ESP32)]
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in a new issue