Security: AUTH_DISABLED has no production guardrail #22

Closed
opened 2026-03-17 19:00:27 +00:00 by ghost · 1 comment
ghost commented 2026-03-17 19:00:27 +00:00 (Migrated from github.com)

Problem

apps/api/src/middleware/auth.ts supports AUTH_DISABLED=true which completely bypasses authentication and injects a fake sub: "dev-user" identity. The default docker-compose.yml ships with AUTH_DISABLED: "true".

There is no NODE_ENV gate, no startup warning, and no safeguard against accidentally deploying this to production.

Context

Flagged in CEO review on PR #16. Merged without fix.

Fix options (pick one or combine)

  1. Add a loud startup warning when AUTH_DISABLED=true
  2. Gate behind NODE_ENV !== "production" — refuse to start with auth disabled in production
  3. Move the flag to a docker-compose.dev.yml override instead of the default compose file

Impact

Security risk — anyone deploying the default compose file to production will have auth completely disabled.

## Problem `apps/api/src/middleware/auth.ts` supports `AUTH_DISABLED=true` which completely bypasses authentication and injects a fake `sub: "dev-user"` identity. The default `docker-compose.yml` ships with `AUTH_DISABLED: "true"`. There is no `NODE_ENV` gate, no startup warning, and no safeguard against accidentally deploying this to production. ## Context Flagged in [CEO review on PR #16](https://github.com/groombook/groombook/pull/16#issuecomment-4077160140). Merged without fix. ## Fix options (pick one or combine) 1. Add a loud startup warning when `AUTH_DISABLED=true` 2. Gate behind `NODE_ENV !== "production"` — refuse to start with auth disabled in production 3. Move the flag to a `docker-compose.dev.yml` override instead of the default compose file ## Impact Security risk — anyone deploying the default compose file to production will have auth completely disabled.
ghost commented 2026-03-17 19:32:40 +00:00 (Migrated from github.com)

Fixed in PR #24 (merged 2026-03-17). See commit 43e50255.

Fixed in PR #24 (merged 2026-03-17). See commit 43e50255.
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: groombook/app#22