feat(admin): cloudprov, the instance provisioning write path

Admin's second and final write path into the control plane. It creates
instances and users and nothing else; inject still owns exactly three
licence fields and is untouched.

The owner's password hash is copied from the HQ account, not shared. The
two diverge on the next password change, which is accepted: propagating a
hash across two databases is worse than two passwords that started equal.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
mrhid6andClaude Opus 5 committed 2026-07-26 13:14:12 +01:00
1 parent 78a0a610be
commit 983655d2a1
3 files changed
+99 -3

No files matched your search

+2
View File
@@ -22,6 +22,7 @@ type Config struct {
RedisPassword string
SigningKey string
PublicURL string
AppLoginURL string
AllowedOrigins []string
TrustProxy bool
Addr string
@@ -63,6 +64,7 @@ func Load() (Config, error) {
RedisPassword: os.Getenv("REDIS_PASSWORD"),
SigningKey: os.Getenv("LICENSE_SIGNING_KEY"),
PublicURL: strings.TrimSuffix(os.Getenv("PUBLIC_URL"), "/"),
AppLoginURL: os.Getenv("APP_LOGIN_URL"),
TrustProxy: strings.EqualFold(os.Getenv("TRUST_PROXY"), "true"),
Addr: ":" + envOr("PORT", "8083"),