From f91d8ed834e61bcd874c8a9ba3ddef7daf80c08a Mon Sep 17 00:00:00 2001 From: boban Date: Sun, 21 Jun 2026 00:24:44 +0200 Subject: [PATCH] =?UTF-8?q?docs(wg):=20SP2=20Phase=203=20plan=20=E2=80=94?= =?UTF-8?q?=20peer=20management=20+=20write-bridge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 --- ...2026-06-21-wireguard-dashboard-p3-peers.md | 860 ++++++++++++++++++ 1 file changed, 860 insertions(+) create mode 100644 docs/superpowers/plans/2026-06-21-wireguard-dashboard-p3-peers.md diff --git a/docs/superpowers/plans/2026-06-21-wireguard-dashboard-p3-peers.md b/docs/superpowers/plans/2026-06-21-wireguard-dashboard-p3-peers.md new file mode 100644 index 0000000..b66aa06 --- /dev/null +++ b/docs/superpowers/plans/2026-06-21-wireguard-dashboard-p3-peers.md @@ -0,0 +1,860 @@ +# WireGuard dashboard — Phase 3 (peer management) Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development. Steps use `- [ ]` checkboxes. + +**Goal:** Create + remove WireGuard client peers from the `/wireguard` dashboard, with the new client config (private key) + QR shown ONCE in a modal and never persisted. + +**Architecture:** The security-critical **write-bridge** (spec §0 Bridge 2, variant A): the app writes `run/wg-request.json` `{id,action,args}`; a new host `.path` watcher runs `clusev-wg.sh serve-request`, which **whitelists the action + re-sanitises every arg host-side**, dispatches to a fixed `cmd_*`, and writes `run/wg-result-.json` (0600, owned by the app uid) + for add-peer a `run/wg-qr-.svg` sidecar. The container's strings are DATA, never code. The Livewire component polls its own pending id for the result (no public route → automatic id-binding) and shows the config+QR once. + +**Tech Stack:** bash (host bridge), systemd `.path`/`.service`, Laravel 13 + Livewire 3 + wire-elements/modal, Tailwind tokens, Pint, shellcheck. Spec: `docs/superpowers/specs/2026-06-20-wireguard-dashboard-sp2-design.md` §0/§4/§6. + +**Run tooling (R8):** tests `docker compose --project-directory /home/nexxo/clusev exec -T -u 1002:1002 app sh -lc '… php artisan test --filter='`; Pint `… vendor/bin/pint `; shellcheck `docker run --rm -v "$PWD:/mnt" -w /mnt koalaman/shellcheck:stable