Feat/client side key generation (#764)
Docker / Build and Push (push) Canceled after 0s
github-pages / deploy (push) Canceled after 0s
Test / make test (push) Canceled after 0s
Docker / release (push) Canceled after 0s

* feat: expose editable key capability to frontend

Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com>

* feat: expose editable keys setting

Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com>

* feat: add browser WireGuard key and config helpers

Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com>

* feat: support browser-only key generation for self provisioning

Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com>

* fix: hide server config actions without private key

Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com>

* refactor: share browser WireGuard key helpers

Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com>

* refactor: reuse WireGuard browser key helpers

Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com>

* fix: address review feedback for client-side key generation

- Make generated key fields read-only so the downloaded config always matches the registered public key
- Drop unreachable error handling and defensive branches; mirror wg_peer.tpl in the config builder
- Keep only the keypair helper shared with KeyGeneraterView
- Restore trailing newlines and remove the duplicated help text
- Document browser-side key generation and add EditableKeys to the v0 swagger spec

Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com>

* test: cover EditableKeys setting and browser-generated peer keys

Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com>

* improve ui, fix potential race condition

---------

Signed-off-by: I.F. <131729144+FukumotoIkuma@users.noreply.github.com>
Co-authored-by: Christoph <christoph.h@sprinternet.at>
This commit is contained in:
I.F.
2026-11-09 22:47:38 +01:00
committed by GitHub
co-authored by Christoph
parent 8ddb46c822
commit 8bd9b6192e
13 changed files with 313 additions and 61 deletions
+1 -1
View File
@@ -154,7 +154,7 @@ More advanced options are found in the subsequent `Advanced` section.
### `editable_keys`
- **Default:** `true`
- **Environment Variable:** `WG_PORTAL_CORE_EDITABLE_KEYS`
- **Description:** Allow editing of WireGuard key-pairs directly in the UI.
- **Description:** Allow editing of WireGuard key-pairs directly in the UI. When enabled, users creating their own peers (self-provisioning) can also generate the key-pair in the browser: the private key is never sent to the server, and the WireGuard configuration file is downloaded once right after creation. It cannot be downloaded or shown again later.
### `create_default_peer` (deprecated)
- **Default:** `false`