feat: enable auth for local requests to Corrosion API (resolves #110)

This commit is contained in:
Pasha Sviderski
2026-05-26 10:07:12 +10:00
parent 26951773d1
commit 9424daff28
6 changed files with 138 additions and 27 deletions
+3
View File
@@ -8,6 +8,7 @@ import (
"sync"
"github.com/psviderski/uncloud/internal/machine/network"
"github.com/psviderski/uncloud/internal/secret"
)
const (
@@ -28,6 +29,8 @@ type State struct {
// Per-actor vector (Corrosion actor UUID → max applied db_version) captured from an existing
// member at join time. Cleared once reached.
MinStoreVersion map[string]int64 `json:",omitempty"`
// CorrosionAPIToken authenticates requests to the local Corrosion API.
CorrosionAPIToken secret.Secret `json:",omitempty"`
// path is the file path config is read from and saved to.
path string