feat(audit): локальный журнал и push в auth-portal
Таблица audit_log, recordAudit на мутациях, GET /api/v1/audit и dual-write source_app=fw. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -23,6 +23,7 @@ Browser → EvoFirewall UI (нет token)
|
||||
| `fw:policies:read` / `write` | `/rules`, overrides |
|
||||
| `fw:stats:read` | `/stats` |
|
||||
| `fw:settings:admin` | `/settings`, install-context |
|
||||
| `fw:audit:read` | `GET /api/v1/audit` (локальный журнал) |
|
||||
|
||||
## Env
|
||||
|
||||
@@ -31,10 +32,13 @@ AUTH_REQUIRED=true
|
||||
AUTH_JWT_SECRET=<тот же JWT_SECRET портала>
|
||||
AUTH_ISSUER=https://auth.shnt.top
|
||||
AUTH_PORTAL_URL=https://auth.shnt.top
|
||||
AUTH_AUDIT_INGEST_SECRET=<AUDIT_INGEST_SECRET портала>
|
||||
PUBLIC_BASE_URL=https://fw.example.com
|
||||
EVOFW_ENROLL_SEED=<hex/seed>
|
||||
```
|
||||
|
||||
Dual-write: мутации agents/lists/rules/policy пишут в локальный `audit_log` и асинхронно шлют batch в `POST {AUTH_PORTAL_URL}/api/v1/ingest/audit` с `source_app: fw`.
|
||||
|
||||
```env
|
||||
# apps/web/.env.local
|
||||
VITE_AUTH_ENABLED=true
|
||||
|
||||
Reference in New Issue
Block a user