Commit Graph

29 Commits

Author SHA1 Message Date
PapaTramp aafb80fa31 feat: proactive host_silence scan for stale agent.heartbeat (0.8.3)
Background scan every 5 min opens rule:host_silence and notifies without
waiting for the next ingest event. CLI job + optional systemd timer.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 09:07:32 +10:00
PapaTramp d3a337992c feat: SAC 0.7.2 security hardening (rate limit, JWT DB check, DOMPurify)
Path traversal fix in SPA fallback, admin-only host delete, login rate limit
with 3 attempts and Telegram alert, JWT validated against active users in DB,
and DOMPurify for agent report HTML.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-01 11:04:14 +10:00
PapaTramp 8de5d14cfb feat: SAC 0.6.0 user edit UI, login to dashboard, daily report timer sync
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-01 09:55:12 +10:00
PapaTramp 42f31b3bb5 fix: dashboard and hosts count SSH and RDP daily reports
analytics-a4: daily_reports_24h uses report.daily.*; sac-deploy enables timers
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-29 16:31:09 +10:00
PapaTramp 415d863b3b feat: SAC daily reports from DB aggregation (notif-32)
- Aggregate report.daily.ssh/rdp from 24h ingest; job and systemd timer

- notify_daily_report bypasses NOTIFY_MIN_SEVERITY; ingest routes agent reports

- HTML templates, env SAC_DAILY_REPORT_*, docs and tests (56 cases)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-29 16:30:07 +10:00
PapaTramp 4167687dec feat: notification cooldown dedup for events and problems (notif-31)
Store last notify time by dedup_key/fingerprint, gate dispatch before
channels; config SAC_NOTIFY_*_COOLDOWN_SEC, migration 008.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-29 16:24:01 +10:00
PapaTramp ebb450be92 feat: global notification policy severity to channels (notif-22)
Singleton notification_policy table, NOTIFY_MIN_SEVERITY/CHANNELS env,
central dispatch gate, Settings policy UI, migration 007.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-29 16:19:26 +10:00
PapaTramp 9b177c145b feat: SMTP email notification channel with UI and ingest
Migration 006, email config DB/env, smtplib sender, settings API,
Settings UI section, and dispatch on event/problem ingest.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-29 16:12:55 +10:00
PapaTramp 20fa7e2c27 feat: webhook notification channel with UI and ingest dispatch
Add webhook config (DB/env), JSON POST on events/problems, settings API,
Settings UI section, and notify_dispatch for multi-channel ingest.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-29 16:09:40 +10:00
PapaTramp e0ba384705 feat: SAC Telegram settings view, notify_problem severity gate, exclusive docs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-29 15:58:08 +10:00
PapaTramp 108e1756c4 feat: live последние события на Dashboard; retention, health, runbook
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-28 11:29:31 +10:00
PapaTramp 64b5ef297a feat: problem rules v1 brute-force, privilege spike, host silence (d1-3)
- Threshold rules on ingest; heartbeat auto-resolves host silence

- Config thresholds in sac-api.env; unit tests

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-28 09:51:05 +10:00
PapaTramp a4a224b284 feat: Problems correlation fingerprint, count, last_seen (d1-2)
- Migration 003; windowed host+type+rule correlation on ingest

- GET /problems filters; GET /problems/{id} with event timeline; ack/resolve 409 guard

- Tests and SAC_PROBLEM_CORRELATION_WINDOW_MINUTES config

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-28 09:46:12 +10:00
PapaTramp 4d603637e5 fix(deploy): sync systemd unit, preflight DB check, health retry
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-28 09:28:01 +10:00
PapaTramp e0b066f5e5 fix(deploy): recover from diverging git after force-push on kalinamall
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-28 09:26:06 +10:00
PapaTramp 8995a34037 fix: faster sac-api restart (TimeoutStopSec, SSE cancel on shutdown) 2026-05-27 14:53:54 +10:00
PapaTramp 04301ab359 feat: host heartbeat status and dashboard metrics (2.2)
Track agent.heartbeat and report.daily.ssh per host; show online/stale
on Hosts UI; dashboard counters and SAC_HEARTBEAT_STALE_MINUTES config.
2026-05-27 13:36:17 +10:00
PapaTramp eeba3a704d feat: Telegram notifications from SAC on ingest
Send Telegram alerts for high/critical events and new Problems.
Configurable via TELEGRAM_* env vars; ingest never fails on send errors.
2026-05-27 12:21:03 +10:00
PapaTramp a4bbc14448 docs: prod status, sac-deploy.sh; update install and deployment guides 2026-05-26 22:03:10 +10:00
PapaTramp 0c5d2537db docs: подробное руководство по копированию wildcard TLS на сервер 2026-05-26 21:15:38 +10:00
PapaTramp 21578b27c9 docs: nginx TLS с корпоративным wildcard VeriSign 2026-05-26 21:14:22 +10:00
PapaTramp 2c12f161a1 fix(nginx): только HTTP до certbot, без ssl без сертификата 2026-05-26 21:12:48 +10:00
PapaTramp 934a5a0c9c fix: загрузка sac-api.env через pydantic, не EnvironmentFile systemd 2026-05-26 21:07:51 +10:00
PapaTramp 539126b75e fix(deploy): конфиг в /opt/security-alert-center/config (sac:sac)
Убирает ошибку Permission denied при каталоге /etc root:root.
2026-05-26 20:59:44 +10:00
PapaTramp 6d33669ac2 fix(docs): sac-api.env chmod 640 root:sac для пользователя sac 2026-05-26 20:53:10 +10:00
PapaTramp 69547d83bc docs: URL sac.kalinamall.ru во всех руководствах и примерах конфигов 2026-05-26 20:30:10 +10:00
PapaTramp 9203af90d5 docs: native Ubuntu install as primary; systemd and nginx
- install-ubuntu-24.04-native.md (production) and -docker.md (alternative)

- deploy/systemd/sac-api.service, nginx/sac.conf.example, env.native.example

- deployment, README, INDEX, work-plan, TZ updated
2026-05-26 20:28:05 +10:00
PapaTramp 69a232d08a feat: backend ingest API, Docker Compose, Ubuntu install guide
- FastAPI: POST /api/v1/events, GET /health, JSON Schema validation

- PostgreSQL models, Alembic migration, bootstrap API key

- deploy/docker-compose.yml, .env.example

- docs/install-ubuntu-24.04.md, updated work-plan (agents first)
2026-05-26 20:21:31 +10:00
PapaTramp 4f3adc9429 docs: ТЗ v1.0, планы и схема SAC (фаза 0)
Security Alert Center — документация без кода приложения.

- TZ, архитектура, интеграция агентов (UseSAC)

- JSON Schema событий v1, deployment Ubuntu 24.04

- План работ, roadmap, multi-root workspace
2026-05-26 19:54:47 +10:00