Skip to content

fix(database): repair raw WireGuard public keys on startup - #576

Merged
sechmann merged 1 commit into
mainfrom
fix/repair-raw-wireguard-public-keys-on-startup
Nov 16, 2026
Merged

sechmann merged 1 commit into
mainfrom
fix/repair-raw-wireguard-public-keys-on-startup

Conversation

@sechmann

Copy link
Copy Markdown
Contributor

Summary

Repair legacy raw 32-byte WireGuard public keys in the database by encoding them as canonical base64 on startup. This keeps stored keys usable by existing readers.

Changes

  • Database repair (internal/apiserver/database/public_keys.go, database.go): repair raw keys in devices and gateways transactionally after migrations; log counts when keys are updated.
  • Tests (public_keys_test.go): cover repair, unchanged keys, repeated startup, and rollback on conflict.

Notes

  • Startup fails if the repair cannot complete.

@github-actions

Copy link
Copy Markdown

📝 Changelog preview

Below is a preview of the Changelog that will be added to the next release. Only commit messages that follow the Conventional Commits specification will be included in the Changelog.

v1.21.0 - 2026-11-16

Full Changelog: v1.20.0...v1.21.0

🚀 Features

  • Support JITA for google auth (ab8a852)
  • Reuse valid google login token for jita (022d658)

🐛 Bug Fixes

  • Allow wg to read config under apparmor for gateway-agent (8bcf374)
  • Allow wg to read config under apparmor for apiserver and prometheus-agent (c6b9803)
  • Re-authenticate when enrolling without tokens (c0df611)
  • Redirect to jita page after google login (952bb38)
  • Repair raw WireGuard public keys on startup (9037c0a)

⚙️ Miscellaneous Changes

  • Make apiserver runnable locally on non-linux, disable bucket sync and otel (43c6aae)

@sechmann
sechmann enabled auto-merge (rebase) November 16, 2026 13:14
@sechmann
sechmann merged commit 79d7848 into main Nov 16, 2026
33 checks passed
@sechmann
sechmann deleted the fix/repair-raw-wireguard-public-keys-on-startup branch November 16, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant