fix(security): harden auth, tenant scoping, and scrub secrets

Require session on APIs, scope KPIs/activos/simulate to the user tenant, strip real JWTs from .env.example, and add health/smoke/docs for 4Ventures ops.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
4Ventures
2026-09-21 10:51:46 +02:00
parent e7b6ab71ca
commit 2df3fe6983
21 changed files with 621 additions and 276 deletions

24
docs/CONVERGENCE.md Normal file
View File

@@ -0,0 +1,24 @@
# Un solo producto: 4Ventures Centro de Mando
## Source of truth
Este repo → https://app.4ventures.es + Supabase + n8n.
## Identidad
- Operador: `marketing@4ventures.es`
- Clientes = tenants aislados por `tenant_id` / slug
- Branding y rutas siempre 4Ventures
## Roadmap de piezas
1. Seguridad / RLS / rotación de secretos
2. Creatividades (review + Storage)
3. ETL/OAuth como complemento a n8n
4. Ops digest / alertas
## No hacer
- Segundo portal por cliente
- Nombrar el producto o el repo con un slug de cliente
- Commitear `.env.local` o JWTs