feat: migrate project secrets and user-scoped colors
Lint / Lint (push) Successful in 25s
Tests / Go backend (push) Successful in 34s
Tests / Dashboard checks (push) Successful in 48s
Docker / Docker Build & Push (push) Successful in 3m29s

This commit is contained in:
Gabriel20xx committed 2026-09-15 13:22:50 +02:00
1 parent f723afa369
commit 07e25a3cf3
13 files changed
+280 -15

No files matched your search

+8 -4
View File
@@ -38,9 +38,8 @@ COOKIE_SECURE=false
# see Core/ProjectConfigurator/README.md's "Pushing core service info to
# other projects". That push is itself authenticated with this secret, so it
# still needs to be set even though AUTHGUARD_URL/CARRIERNODE_URL don't. A
# push never overrides AUTH_DISABLED=true; it only ever retargets an
# already-enabled AuthGuard connection.
# INTERNAL_SERVICE_SECRET=
# push never overrides AUTH_DISABLED=true; it only ever retargets an
# already-enabled AuthGuard connection.
#################################################################
# PostgreSQL configuration
@@ -63,4 +62,9 @@ DB_INIT_RETRY_MAX_ATTEMPTS=0
SYNC_MAX_FUTURE_SKEW_MS=0
# Notification retention period in milliseconds (default: 7 days)
NOTIF_RETENTION_MS=604800000
NOTIF_RETENTION_MS=604800000
# Required shared-service authentication secret.
SECRET=change-me-to-a-long-random-value
# Set true only for local development or a standalone deployment.
AUTH_DISABLED=false
+5 -1
View File
@@ -44,6 +44,11 @@ func main() {
fmt.Fprintln(os.Stderr, "DATABASE_URL environment variable is required")
os.Exit(1)
}
internalServiceSecret := strings.TrimSpace(os.Getenv("SECRET"))
if internalServiceSecret == "" {
fmt.Fprintln(os.Stderr, "SECRET environment variable is required")
os.Exit(1)
}
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
@@ -84,7 +89,6 @@ func main() {
// auth.SetAuthGuardBaseURL retargets the live AuthGuard client sharedauth.Service holds
// internally on every push, so AuthGuard moving to a new URL takes effect without a restart -- it
// is a no-op when this service was constructed in auth-disabled mode (AUTH_DISABLED=true above).
internalServiceSecret := strings.TrimSpace(os.Getenv("INTERNAL_SERVICE_SECRET"))
carrierNodeURL := strings.TrimSpace(os.Getenv("CARRIERNODE_URL"))
coreConfig := coreconfig.NewStore(coreconfig.Info{AuthGuardURL: authGuardURL, CarrierNodeURL: carrierNodeURL})
coreConfig.OnUpdate(func(info coreconfig.Info) {