Add AUTH_DISABLED opt-out for sharedauth's new pending mode
Docker / Docker Build & Push (push) Successful in 5m39s
Lint / Lint (push) Successful in 51s
Tests / Go backend (push) Successful in 1m12s
Tests / Dashboard checks (push) Successful in 1m11s

sharedauth.NewWithStore now treats an empty AUTHGUARD_URL as "pending"
(still gated, failing closed) rather than permanently disabled, so a
ProjectConfigurator-registered CollabTable no longer needs
AUTHGUARD_URL set at all. Add AUTH_DISABLED (default false) to opt
into the old fully-open behavior explicitly via sharedauth.Disabled(),
and update both READMEs/.env.example to document the three resulting
states.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Gabriel20xxandClaude Sonnet 5 committed 2026-09-14 14:12:34 +02:00
1 parent a018f3da4c
commit f723afa369
7 files changed
+84 -38

No files matched your search

+11 -6
View File
@@ -79,8 +79,10 @@ notification events.
Browser authentication proxies to AuthGuard (`AUTHGUARD_URL`), which sets and reads its own
`auth_session` HTTP-only cookie; CollabTable itself mints no session token. Any number of
accounts can exist, with `user`/`admin`/`superadmin` roles managed via `/api/auth/users`.
`AUTHGUARD_URL` is optional: leaving it unset disables authentication entirely (no login
screen, nothing gated) rather than falling back to any local account store -- only use that for
AuthGuard integration has three states: `AUTHGUARD_URL` set (used immediately); unset with
`AUTH_DISABLED` unset/false (the default -- "pending": auth stays fully enabled/gated, waiting
for ProjectConfigurator's push, failing closed on auth calls until then); or `AUTH_DISABLED=true`
(authentication fully off -- no login screen, nothing gated). Only set `AUTH_DISABLED=true` for
local development or a deployment you are certain does not need access control. API tokens are
unrelated to AuthGuard (see below), hashed at rest, and shown only when generated.
@@ -112,10 +114,13 @@ unrelated to AuthGuard (see below), hashed at rest, and shown only when generate
- `APP_VERSION` — optional version displayed in the dashboard, default `dev`
- `COOKIE_SECURE` — set to `true` when served over HTTPS
- `DATABASE_URL` — PostgreSQL connection string, required
- `AUTHGUARD_URL` — base URL of the AuthGuard identity service CollabTable authenticates
against, default unset (auth disabled). Leaving it unset does not fall back to any local
account store -- it disables authentication entirely, treating every request as
authenticated with nothing gated.
- `AUTHGUARD_URL` — optional bootstrap/override base URL of the AuthGuard identity service
CollabTable authenticates against, default unset (pending). 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` — set `true` to disable authentication entirely (no login screen, nothing
gated, every request treated as authenticated), default `false`. For local development or a
standalone deployment with no AuthGuard integration at all.
- `DB_INIT_RETRY_INTERVAL_MS` — startup retry delay, default `5000`
- `DB_INIT_RETRY_MAX_ATTEMPTS` — maximum startup attempts, `0` retries forever
- `SYNC_MAX_FUTURE_SKEW_MS` — allowed client timestamp skew, default `0`