Дмитрий
|
57d84c6ea3
|
feat(audit): Task 7 — log all SupplierWebhookController outcomes to webhook_log
- schema v8.29: webhook_log +source/status/lead_id/ip_address/created_at,
tenant_id nullable, +idx_webhook_log_status
- migration 2026_05_22_000002_webhook_log_supplier_columns
- SupplierWebhookController::logSupplierWebhook() private helper (silent/non-throwing)
called at 4 exit points: rejected_secret/rejected_ip/rate_limited/received
- SupplierWebhookLoggingTest: 4 tests 17 assertions GREEN
- Regression SupplierWebhookTest: 13/13 GREEN
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-22 18:53:10 +03:00 |
|
Дмитрий
|
948bdb72d1
|
feat(schema): tenant_operations_log table with hash-chain protection (P2)
+1 table tenant_operations_log — журнал тенант-уровневых операций вне сделок
(проекты, API-ключи, webhook URL). Параллельна activity_log без deal_id NOT NULL.
- Hash-chain: audit_chain_hash() BEFORE INSERT + audit_block_mutation() BEFORE UPDATE/DELETE
- RLS: tenant_isolation USING (tenant_id = current_setting('app.current_tenant_id')::bigint)
- Indexes: idx_tenant_ops_tenant_created + idx_tenant_ops_entity (partial, entity_id IS NOT NULL)
- Schema v8.28: 66 tables (64 regular) / 125 indexes / 41 RLS / 15 triggers
- Applied: liderra ✅ + liderra_testing ✅
- Smoke: INSERT hash_len=32 ✅ / UPDATE blocked (audit log is append-only) ✅
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-22 18:53:06 +03:00 |
|