Commit Graph

244 Commits

Author SHA1 Message Date
PapaTramp 985d51c4ba feat: show RDP session duration in Overview and Events (0.5.16)
Add session_duration_sec to EventSummary and a Duration column (HH:MM:SS / Nd HH:MM:SS).
2026-07-14 16:18:50 +10:00
PapaTramp 52125a5a98 fix: enrich empty rdp.login.success user from RDG 302 (0.5.15)
RCM 1149 often leaves Param1/Param2 empty through RD Gateway; backfill details.user from matching RDG success within 5 minutes, and still close empty-user sessions on RDG end.
2026-07-14 10:47:10 +10:00
PapaTramp d95b93992d fix: parse Disc qwinsta rows so RDG flap auto-logoff works (0.5.14)
Empty SESSIONNAME broke session matching; auto-disconnect failed with 'No matching Windows session'.
2026-07-14 10:32:17 +10:00
PapaTramp d20517804d docs: rdp.session.logoff is workstation-only (agent 2.1.12-SAC) 2026-07-13 17:36:31 +10:00
PapaTramp 91bd6afd1f fix: start sac-api via /usr/bin/bash to avoid systemd 203/EXEC
ExecStart no longer relies on shebang when CRLF slips into deploy scripts.
sac-deploy strips CR from all deploy/*.sh and waits for active before health check.
2026-07-13 17:29:28 +10:00
PapaTramp dd2356cf04 fix: LF line endings in deploy shell scripts (systemd 203/EXEC)
CRLF in sac-api-start.sh shebang broke sac-api with status=203/EXEC on Linux.
Add .gitattributes for *.sh and strip CR in sac-deploy before chmod.
2026-07-13 17:23:58 +10:00
PapaTramp 3475c1811b fix: platform-specific placeholder in agent update log modal (v0.5.13)
Windows WinRM updates no longer show the Linux /var/log/update_script.log hint while output is still empty.
2026-07-13 17:18:49 +10:00
PapaTramp 91be282ec6 feat: close rdp.login.success on rdp.session.logoff (v0.5.12)
Ingest correlates direct RDP logoff with open login events on the same host and user. Terminate-session treats missing qwinsta as already logged off.
2026-07-13 17:10:24 +10:00
PapaTramp 310e7f699d fix: ignore stale SSH update job until running or session start (v0.5.10)
Modal finish only after sawRunning or started_at after sessionOpenedAt, so a previous success no longer closes the window instantly while SAC updater is still running on the host.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 15:05:56 +10:00
PapaTramp e7d5b1c60b fix: SSH update modal polls locally, collapsed log by default (v0.5.9)
Modal owns job poll and completion UI with countdown; log hidden until user clicks Показать лог; db.refresh on remote-job; cache-bust poll requests.
2026-07-08 14:48:31 +10:00
PapaTramp 69fac2f26e fix: live SSH update log re-renders in modal (v0.5.7)
Remove cached openLogs computed that blocked Vue updates to output/loading; preserve log tail on empty poll; auto-scroll log panel.
2026-07-08 14:41:14 +10:00
PapaTramp c222dd7d41 fix: SSH update log modal shows completion and full tail (v0.5.6)
Fetch final update_script.log tail after agent-update, update title/message on success, show log by default; auto-close after 30s unchanged.
2026-07-08 14:26:28 +10:00
PapaTramp 6565b7d679 docs: mark ssh-monitor 4.2 ingest backlog items done
Shutdown sac-fail.count suppress and SAC_TIMEOUT_SEC docs shipped in ssh-monitor 2.3.2-SAC.
2026-07-08 14:12:40 +10:00
PapaTramp b148b558c3 feat: ingest burst hardening — defer lifecycle/auth, workers, nginx (v0.5.5)
Defer notify_lifecycle and notify_auth_login after commit; SAC_UVICORN_WORKERS via sac-api-start.sh; nginx /api/v1/events timeout; mass-update confirm in Hosts UI.
2026-07-08 13:16:13 +10:00
PapaTramp 1ad01534f1 fix: remote job stuck after SSH update completes (v0.5.4)
Treat agent_update_state as source of truth for active job; poll log thread no longer overwrites finished status.
2026-07-08 12:30:14 +10:00
PapaTramp 253b80c500 fix: suppress sudo Telegram during SAC agent update (v0.5.3) 2026-07-08 12:23:29 +10:00
PapaTramp f569293d52 fix: hide update log when user clicks Скрыть лог 2026-07-08 12:07:19 +10:00
PapaTramp d47131cd9f feat: live update log in UI and suppress lifecycle Telegram during SAC update
Poll remote update_script.log while SSH update runs; skip lifecycle notify
when host agent_update_state is running (SAC v0.5.1).
2026-07-08 11:46:53 +10:00
PapaTramp 1639261cde docs: backlog for ingest resilience during mass agent updates
Operational and code TODOs from mass SSH-update incident; does not
block ssh-monitor phase 2.2.0.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 11:28:57 +10:00
PapaTramp fa1bd41c92 fix: sac-deploy validate sac-api.env without bash source
Preflight pydantic parse catches inline comments in env values; alembic
and stale remote_action reset use SAC_CONFIG_FILE. Document env format
and ssh_known_hosts in runbook.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 10:21:49 +10:00
PapaTramp 3cabf12f68 fix: SAC-first ssh-monitor update (UPDATE_VIA_SAC, bootstrap --deploy)
Pass UPDATE_VIA_SAC to the remote updater and run bootstrap with --deploy
so Linux hosts need only the SAC update button after initial config.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 09:44:24 +10:00
PapaTramp 9bfc5e23f7 fix: harden push-github-snapshot.sh for macOS and secret scan
Strip BOM, skip self-sanitization, replace default DB password in mirror,
and simplify pre-push scan to private keys only.
2026-07-07 19:46:26 +10:00
PapaTramp 9e43de6fc1 chore: release SAC 0.5.0
Bump version, document security hardening in README, add github snapshot
push script with URL/login/IP sanitization for public mirror.
2026-07-07 19:44:08 +10:00
PapaTramp 80320ae698 fix: harden SAC security per audit (0.4.15)
Close audit findings: anti-spoof client IP for login rate limit, JWT/CORS
enforce on startup, SSH host-key verification and sudo via stdin, optional
WinRM HTTPS, SSE httpOnly cookie auth, ingest body limit, ILIKE escaping,
and HMAC API key hashing with legacy SHA-256 fallback.
2026-07-07 19:32:12 +10:00
PapaTramp 939fe122c5 fix: WinRM RDP bundle staging in %TEMP% (0.4.14)
Move zip download and extract to user TEMP to avoid ProgramData access denied on DCs. Improve WinRM ERROR line parsing and add optional SAC_AGENT_BUNDLE_BASE_URL for LAN clients.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 12:11:54 +10:00
PapaTramp c72e510fb0 fix: defer daily report push и увеличить pool БД (0.4.12)
FCM/каналы для report.daily.* после commit ingest (BackgroundTasks);
SAC_DB_POOL_SIZE=15, SAC_DB_MAX_OVERFLOW=25 для штурма 09:00.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 12:00:37 +10:00
PapaTramp 6c43b8637e fix: dedupe host_silence problems under concurrent scans (0.4.11)
Treat acknowledged as active, dedupe by hostname, add PostgreSQL advisory lock and a unique index. Migration closes existing duplicate open problems.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-03 09:05:28 +10:00
PapaTramp 3765d4d476 feat: RDP flap auto-disconnect and hide break button after reconnect (0.4.10)
Add optional auto logoff of stuck sessions on RDG flap and direct RDP failure. Hide the RDS break button on old flap 302 when the user later reconnects or the workstation session is closed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 16:50:03 +10:00
PapaTramp 10ae670962 fix: prevent duplicate host_silence problems per host (0.4.8)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-30 09:12:10 +10:00
PapaTramp daeb7e965d fix: skip alerts for hidden event types, show them on host card (0.4.7)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 15:16:10 +10:00
PapaTramp 606bf53019 feat: close workstation login on RDG 303 disconnect (0.4.6)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 08:16:06 +10:00
PapaTramp fd1be5e7e4 feat: manual host add from Hosts list via WinRM/SSH (0.4.5)
Add host button probes Windows by hostname or Linux by IP, registers host in SAC and deploys agent in background.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 15:34:12 +10:00
PapaTramp 5a7909bb55 fix: clear stale remote actions on sac-api startup (0.4.4)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 10:44:53 +10:00
PapaTramp 86fd400f0b fix: reset stale remote agent updates after sac-api restart (0.4.3)
Clear zombie running jobs on deploy and add admin API to cancel a stuck job.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 10:43:31 +10:00
PapaTramp dd2ae51b43 feat: parallel agent upgrades with per-host log panels (0.4.2)
Allow multiple remote update jobs at once; each upgrade gets its own
bottom-right log dock that auto-closes 30s after success.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 10:22:31 +10:00
PapaTramp 719d5c5719 feat: login IP whitelist, blocks UI and fail2ban sync (0.4.1)
Admin settings for web login whitelist, blocked IP list with unblock,
and optional fail2ban ignoreip sync for SSH jail.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 10:06:10 +10:00
PapaTramp bda02f67eb ui: grey out other upgrade arrows while host update runs (0.4.0)
Show inactive grey arrows on other hosts during a single remote agent update; bump SAC to 0.4.0.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 15:44:31 +10:00
PapaTramp 9053ef0588 feat: one-click agent upgrade from hosts list (0.3.9)
Add Omada-style git version arrow in the agent version column to trigger WinRM/SSH background updates, and soften host detail live refresh with debounced incremental event patches.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 15:32:09 +10:00
PapaTramp 0601aafd2d fix: hide ????????? after session terminate (0.3.8)
Persist session_terminated in event details, expose in API, and update Events/Dashboard UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 14:45:33 +10:00
PapaTramp 8b3e43f30d fix: event terminate-session 500 on rdp.login.success (0.3.7)
Use extract_event_actor_user instead of missing ORM field; map WinRM/SSH errors to HTTP 400.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 14:37:37 +10:00
PapaTramp 6330f31162 docs: sync README version lines with APP_VERSION 0.3.6
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 14:14:43 +10:00
PapaTramp b47cbf03c5 ui: remove duplicate SAC version from overview page
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 16:35:45 +10:00
PapaTramp 407ef37004 fix: strict RDG 302/303 IP pairing keeps break button visible (0.3.6)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 16:30:16 +10:00
PapaTramp 64b942447b fix: reconcile daily report active users count and list (0.3.5)
Normalize empty-session placeholders; sync stats with report body after ingest.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 14:41:47 +10:00
PapaTramp 8b52c5fe3c fix: show RDS break only on active or flap 302 events (0.3.4)
Hide Obryv RDS on 303 and on 302 after normal session end; keep for open sessions and RDG flap.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 20:15:47 +10:00
PapaTramp fbd213f323 chore: bump npm dompurify and vite for audit fixes (0.3.3)
dompurify 3.4.11, vite 6.4.3 — npm audit reports 0 vulnerabilities.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 20:13:43 +10:00
PapaTramp 1b96a3b2c7 fix: RDG event label and prefix type filter (0.3.2)
Use event 302/303 instead of Win302 in RDG titles. Match event types by prefix in events list (e.g. rdg.connection).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 20:07:22 +10:00
PapaTramp 24ca87a47a feat: RDG 302/303 display path labels and RDS session break (0.3.1)
Show RDS access via RDG-Comp or Haproxy-RDG-Comp, enable qwinsta/logoff on any RDG event with internal_ip.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 19:52:22 +10:00
PapaTramp 4eb41608ea chore: release SAC 0.3.0
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 16:07:54 +10:00
PapaTramp 6e3f0ede4d fix(backend): loginctl JSON parse and filter ephemeral SSH sessions (0.20.34)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 16:00:02 +10:00