diff --git a/README.md b/README.md
index ffb80d9..cfcc1a6 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,7 @@ AuthGuard integration has three states:
Because AuthGuard doesn't know "this is CollabTable's initial account" and can't answer "have any accounts been registered yet" (it's a shared identity store other projects and other CollabTable instances may already use), the one-time setup screen is instead gated by a small local flag in Postgres, independent of AuthGuard's own state.
-`AUTHGUARD_URL` and `CARRIERNODE_URL` are also only the bootstrap fallback: once CollabTable is registered in ProjectConfigurator's Projects workspace, ProjectConfigurator pushes both values here automatically (`PUT /api/core-services/internal`, `X-Internal-Auth`-gated with `INTERNAL_SERVICE_SECRET`) and keeps them current with no restart — see `Core/ProjectConfigurator/README.md`'s "Pushing core service info to other projects". This means `AUTHGUARD_URL` no longer needs to be set at all for a registered deployment: it stays "pending" until the first push. A push never overrides `AUTH_DISABLED=true`; it only ever retargets an already-enabled AuthGuard connection. CarrierNode isn't used by any feature here yet, but the client is wired and ready.
+`AUTHGUARD_URL` and `CARRIERNODE_URL` are also only the bootstrap fallback: once CollabTable is registered in ProjectConfigurator's Projects workspace, ProjectConfigurator pushes both values here automatically (`PUT /api/core-services/internal`, `X-Internal-Auth`-gated with `SECRET`) and keeps them current with no restart — see `Core/ProjectConfigurator/README.md`'s "Pushing core service info to other projects". This means `AUTHGUARD_URL` no longer needs to be set at all for a registered deployment: it stays "pending" until the first push. A push never overrides `AUTH_DISABLED=true`; it only ever retargets an already-enabled AuthGuard connection. CarrierNode isn't used by any feature here yet, but the client is wired and ready.
The device-sync API token (generated from the dashboard's Settings page, used by the Android app's `Authorization: Bearer` header for `/api/lists`, `/api/fields`, `/api/items`, `/api/sync`, and notification polling) is unrelated to AuthGuard and unaffected by whether it's configured: it's a long-lived per-account credential for a user's own devices, not a browser session, and stays entirely local to CollabTable's own Postgres.
@@ -49,7 +49,7 @@ The device-sync API token (generated from the dashboard's Settings page, used by
| `AUTHGUARD_URL` | No | unset (pending) | Optional bootstrap/override base URL of the AuthGuard identity service. Leaving it unset does not disable authentication — it leaves the service "pending" until ProjectConfigurator pushes a URL, failing closed on auth calls until then. Use `AUTH_DISABLED` to actually turn auth off. |
| `AUTH_DISABLED` | No | `false` | Set `true` to disable authentication entirely (no login screen, nothing gated, every request treated as authenticated) — for local development or a standalone deployment with no AuthGuard integration at all. |
| `CARRIERNODE_URL` | No | unset | Base URL of a CarrierNode instance. Bootstrap fallback only — see below; not used by any feature here yet. |
-| `INTERNAL_SERVICE_SECRET` | No | unset (push endpoint refuses every caller) | Shared secret, the same value CarrierNode/ProjectConfigurator were configured with, checked against `X-Internal-Auth` on `PUT /api/core-services/internal`. |
+| `SECRET` | No | unset (push endpoint refuses every caller) | Shared secret, the same value CarrierNode/ProjectConfigurator were configured with, checked against `X-Internal-Auth` on `PUT /api/core-services/internal`. |
| `PORT` | No | `8080` | HTTP listen port |
| `APP_VERSION` | No | `dev` | Version label shown on the dashboard's About page |
| `COOKIE_SECURE` | No | `false` | Set `true` once served over HTTPS, to mark cookies `Secure` |
diff --git a/backend/.env.example b/backend/.env.example
index 463c3d9..11557b5 100644
--- a/backend/.env.example
+++ b/backend/.env.example
@@ -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
diff --git a/backend/server.go b/backend/server.go
index cd2d485..07b0ff0 100644
--- a/backend/server.go
+++ b/backend/server.go
@@ -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) {
diff --git a/frontend/src/lib/features/layout/SettingsDialog.svelte b/frontend/src/lib/features/layout/SettingsDialog.svelte
index 8464a3e..228bf73 100644
--- a/frontend/src/lib/features/layout/SettingsDialog.svelte
+++ b/frontend/src/lib/features/layout/SettingsDialog.svelte
@@ -1,7 +1,7 @@