Practitionist / Practitionist/elluminar_web

🔴 Security & auth hardening for production

Open
#35 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

beta-blocker
Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
17h 2m
Merged PRs (30d)
18

Description

Context

Dev-only auth bypass + demo accounts exist for local review and must be resolved before real users.

Tasks

  • Separate prod database — mock seed + demo accounts must not live in the prod DB (currently shared Supabase). Provision a clean prod DB.
  • Delete/rotate demo accountsadmin@demo.test, creator@demo.test, orgadmin@demo.test use the known password DemoPass123!; a known-password platform admin cannot exist in prod.
  • Bypass gating — confirm DEV_DISABLE_AUTH is never set in prod env and NODE_ENV=production; consider stripping the src/proxy.ts / src/lib/auth/session.ts bypass from the prod build.
  • Secrets — real BETTER_AUTH_SECRET; rotate anything seen in a dev .env; secrets only in the prod host, never committed.
  • Auth hardening — rate-limiting / brute-force protection; enforce email verification (on); finish 2FA rollout; cookie/session security; CSP + security headers.
  • RBAC audit — verify requireUser / requireTenantMember / requirePlatformAdmin gates on all 5 surfaces; no IDOR on tenant/credential/order lookups.
  • Security reviewpnpm audit, secret scanning, run a full security-review pass.

Acceptance

No dev-only auth path reachable in prod; no known-password accounts; secrets rotated; security review clean.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/proxy.ts and src/lib/auth/session.ts, then trace the requireUser, requireTenantMember, and requirePlatformAdmin gates across the five surfaces named in the issue. Inspect the production environment and Supabase setup, run pnpm audit and the repository's security checks, and use the acceptance criteria to verify that no development auth path or known-password account remains.

Written by the indexing model from the issue text.

Assessment

Tech stack
supabase, typescript
Domain
authentication, authorization, backend, cloud, database, security
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.