Use plain Mermaid diagrams again and drop the SVG images

The preview problems were caused by the diagram text, which is now fixed in
every copy, so the pre-rendered SVGs (white background, harder to keep in
sync) are no longer needed. Also updates docker/docs with the fixed text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 11:31:29 +03:30
co-authored by Claude Sonnet 5.5
parent c1fcfb7b73
commit 20d69b93b7
10 changed files with 30 additions and 65 deletions
-12
View File
@@ -111,10 +111,6 @@ Role `enroll` (assigned to the anonymous group):
### 7.2 Protocol
![Enrollment protocol sequence diagram](diagrams/enrollment-protocol.svg)
<details><summary>Mermaid source of this diagram</summary>
```mermaid
sequenceDiagram
participant B as Board
@@ -132,8 +128,6 @@ sequenceDiagram
B->>B: persist FN and pw to flash, then reconnect as FN
```
</details>
- `sig` = Ed25519 over `S || B || n1 || clientid || FN`. Binding the FN and the Client ID means a reply for another request, board or identity does not verify.
- The password is **hex of HKDF-SHA256(shared secret, salt = n1, info = "robot-market/mqtt-pw/v1|" + FN, 32 bytes)**. The label separates this use of the secret from any other.
- The first successful FN login is the enrollment acknowledgement.
@@ -161,10 +155,6 @@ The board logs in as `FN`, Client ID `FN`, with the derived password, sends `boa
### 9.2 Flow
![Activation flow sequence diagram](diagrams/activation-flow.svg)
<details><summary>Mermaid source of this diagram</summary>
```mermaid
sequenceDiagram
participant O as Operator (UI)
@@ -185,8 +175,6 @@ sequenceDiagram
G->>G: DB: ACTIVE, disable the FN client, audit
```
</details>
### 9.3 Rules that make it safe
1. **SAS bound to the activation key.** The board shows a code derived from `B2` (and `n2`, FN). The operator compares it with what the backend received. An attacker who stole an FN password and sends a request with their own key produces a code that does not match what the real board displays. **This check is mandatory**, not optional; without it the operator could attach a stranger's FN to a real SN.
2. **Activation code** (from the existing activation flow): single use, expiring, bound to one SN, attempt-limited. It proves the operator is physically at the machine.