docs: refresh operator runbook and creatives copy after prod cutover
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,55 +1,45 @@
|
||||
# Operador marketing@4ventures.es
|
||||
|
||||
La contraseña del portal legado **no** vale en Supabase Auth (`invalid_credentials`).
|
||||
## Estado (2026-09-21)
|
||||
|
||||
## Alta / reset en Studio
|
||||
- Usuario **creado** en Supabase Auth (`role=admin`, `tenant_id` = 4Ventures Central).
|
||||
- Password local (gitignored): `.ops/marketing-credentials.txt`
|
||||
- Login verificado en https://app.4ventures.es/login → `/dashboard/*` y `/dashboard/agencia`
|
||||
- `sql/creatives.sql` **aplicado** en prod; RLS activo en tablas de negocio (incl. `agent_runs`)
|
||||
|
||||
1. Abre https://supabase.4ventures.es (Studio) con cuenta admin de infra.
|
||||
2. **Authentication → Users → Add user**
|
||||
- Email: `marketing@4ventures.es`
|
||||
- Password: genera una fuerte (guárdala en el gestor de la agencia)
|
||||
- Auto Confirm: sí
|
||||
3. En el usuario → **User Metadata** / **App Metadata** (JSON), por ejemplo:
|
||||
## Login
|
||||
|
||||
1. Abre https://app.4ventures.es/login
|
||||
2. Email: `marketing@4ventures.es`
|
||||
3. Password: la de `.ops/marketing-credentials.txt` (o el gestor de la agencia)
|
||||
|
||||
## Reset / reprovision (si hace falta)
|
||||
|
||||
Studio (Kong) o Admin API con service role:
|
||||
|
||||
```json
|
||||
{
|
||||
"role": "admin",
|
||||
"company": "4Ventures",
|
||||
"slug": "4ventures-hub"
|
||||
"slug": "4ventures-hub",
|
||||
"tenant_id": "0b3c5fc0-6901-4caf-b26a-b6a0201d8541"
|
||||
}
|
||||
```
|
||||
|
||||
App metadata (preferible para rol):
|
||||
|
||||
```json
|
||||
{
|
||||
"role": "admin",
|
||||
"tenant_id": "<uuid-del-tenant-hub-si-existe>"
|
||||
}
|
||||
```
|
||||
|
||||
4. Si usáis `provision_client`, también podéis:
|
||||
|
||||
```sql
|
||||
select public.provision_client(
|
||||
'4Ventures',
|
||||
'4ventures-hub',
|
||||
'marketing@4ventures.es',
|
||||
'CONTRASEÑA_FUERTE_AQUI',
|
||||
'admin'
|
||||
);
|
||||
```
|
||||
|
||||
5. Login en https://app.4ventures.es/login con ese email/password.
|
||||
|
||||
## Rotación de API keys (obligatorio)
|
||||
## Rotación de API keys (recomendado)
|
||||
|
||||
Settings → API → Regenerate `anon` y `service_role`.
|
||||
Actualizar en Dokploy env del contenedor `app` (y n8n si las usa).
|
||||
Nunca volver a pegar keys en PDFs ni `.env.example`.
|
||||
Actualizar en Dokploy → Web4Ventures → `client-portal` → Environment (API `application.update`).
|
||||
Nunca pegar keys en PDFs ni `.env.example`.
|
||||
|
||||
## Pendiente ops
|
||||
|
||||
- `ANTHROPIC_API_KEY` en Dokploy env si se quiere el asistente LLM
|
||||
- IP allowlist Traefik para `git` / `n8n` — ver `.ops/HARDEN_SURFACES.md`
|
||||
|
||||
## Verificación
|
||||
|
||||
- Rol `admin` → ve `/dashboard/agencia`
|
||||
- Rol `client` → redirigido fuera de agencia
|
||||
- Chat/simulate solo con sesión
|
||||
- Health: `serviceRoleConfigured: true`
|
||||
|
||||
Reference in New Issue
Block a user