64b5ef297a
- Threshold rules on ingest; heartbeat auto-resolves host silence - Config thresholds in sac-api.env; unit tests Co-authored-by: Cursor <cursoragent@cursor.com>
41 lines
1.5 KiB
Plaintext
41 lines
1.5 KiB
Plaintext
# Native: /opt/security-alert-center/config/sac-api.env
|
|
# sudo chown sac:sac ... && sudo chmod 600 ...
|
|
# Пароль в URL — в двойных кавычках. Символ # в пароле допустим только внутри кавычек.
|
|
# systemd НЕ парсит этот файл — читает приложение (SAC_CONFIG_FILE).
|
|
|
|
DATABASE_URL=postgresql+psycopg2://sac:CHANGE_ME_POSTGRES_PASSWORD@127.0.0.1:5432/sac
|
|
|
|
SAC_PUBLIC_URL=https://sac.kalinamall.ru
|
|
JWT_SECRET=CHANGE_ME_openssl_rand_hex_32
|
|
|
|
# API key для агентов: Authorization: Bearer <ключ>
|
|
# python3.12 -c "import secrets; print('sac_'+secrets.token_urlsafe(32))"
|
|
SAC_BOOTSTRAP_API_KEY=sac_replace_with_generated_key
|
|
|
|
EVENT_SCHEMA_PATH=/opt/security-alert-center/schemas/event-schema-v1.json
|
|
|
|
SAC_ADMIN_USERNAME=admin
|
|
SAC_ADMIN_PASSWORD=
|
|
|
|
# Telegram notifications from SAC (phase 1C.4)
|
|
TELEGRAM_ENABLED=false
|
|
TELEGRAM_BOT_TOKEN=
|
|
TELEGRAM_CHAT_ID=
|
|
TELEGRAM_MIN_SEVERITY=high
|
|
|
|
# Статус хоста по agent.heartbeat (минуты; ssh-monitor шлёт ~раз в 12 ч)
|
|
SAC_HEARTBEAT_STALE_MINUTES=780
|
|
|
|
# Корреляция Problems: host + type + rule в одном open Problem (минуты)
|
|
SAC_PROBLEM_CORRELATION_WINDOW_MINUTES=60
|
|
|
|
# rule:brute_force_burst (ssh.login.failed / rdp.login.failed)
|
|
SAC_BRUTE_FORCE_WINDOW_MINUTES=15
|
|
SAC_BRUTE_FORCE_THRESHOLD=30
|
|
|
|
# rule:privilege_spike (privilege.sudo.command)
|
|
SAC_PRIVILEGE_SPIKE_WINDOW_MINUTES=10
|
|
SAC_PRIVILEGE_SPIKE_THRESHOLD=10
|
|
|
|
CORS_ORIGINS=*
|