add authenticated tenant-scoped sessions
This commit is contained in:
@@ -9,6 +9,7 @@ A safety-first MVP vertical slice for evidence-led prospect discovery and qualif
|
||||
- JSON API under `/api/v1` for health, dashboard summary, businesses, suppression, and CSV-style import preview.
|
||||
- Responsive static dashboard under `apps/web` with explorer filters, evidence/freshness labels, detail review, manual intake, and browser-only CSV preview.
|
||||
- Docker Compose runtime with non-root containers, read-only filesystems, health checks, and a named SQLite data volume.
|
||||
- Browser authentication with server-side sessions and an optional first-run admin bootstrap.
|
||||
- Security and operations guidance in `docs/`.
|
||||
|
||||
## Run locally
|
||||
@@ -49,7 +50,11 @@ curl -fsS http://localhost:8080/healthz
|
||||
docker compose down
|
||||
```
|
||||
|
||||
The initial pilot deliberately omits Postgres, Redis, Celery, external discovery adapters, DNS/HTTP scanning, authentication, and outbound messaging. Those are separate release gates from the implementation plan and must not be inferred from this MVP. Before production use, add real authentication/tenant isolation, migrations, SSRF-safe scanners, approved source registry, queue idempotency, backups/restore drills, legal review, and security testing.
|
||||
Compose passes the optional `BOOTSTRAP_ADMIN_EMAIL` and `BOOTSTRAP_ADMIN_PASSWORD` values to the API. Set both in an untracked `.env` only when provisioning a fresh instance, then remove them and rotate the password after the bootstrap admin is created. No credentials belong in this repository.
|
||||
|
||||
Authenticated browser requests use a server-side session cookie; login creates a session and logout invalidates it. The liveness endpoints (`GET /api/v1/health/live` and `GET /healthz`) intentionally remain unauthenticated so Docker, ingress, and monitoring health checks can use them. Authentication is not a substitute for tenant/authorization checks: protected routes must enforce the session and organization boundary server-side.
|
||||
|
||||
The initial pilot still omits Postgres, Redis, Celery, external discovery adapters, DNS/HTTP scanning, and outbound messaging. Before production use, complete the production security gates described in `docs/SECURITY.md`, including Argon2id password hashing, MFA for administrator accounts, TLS, CSRF protection, rate limiting, audit logging, migrations, SSRF-safe scanners, approved source registry, queue idempotency, and tested backups/restores.
|
||||
|
||||
## Verification
|
||||
|
||||
|
||||
Reference in New Issue
Block a user