docs(iwooos): record Wazuh agent visibility incident
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
# Wazuh 用戶端消失事故只讀回讀
|
||||
|
||||
| 項目 | 內容 |
|
||||
|------|------|
|
||||
| 日期 | 2026-06-24 |
|
||||
| 狀態 | `runtime_dashboard_agent_visibility_incident_readonly_triage` |
|
||||
| 事故焦點 | Wazuh Dashboard 顯示用戶端消失,但 IwoooS 尚未具備 live agent registry readback |
|
||||
| runtime gate | `0` |
|
||||
|
||||
## 1. 結論
|
||||
|
||||
這次不能再用「Wazuh 已建置」或「Dashboard 可開」當成資安機制有效。現有 IwoooS 機制仍停在 source-side 只讀框架、前台邊界與 owner gate,production `/api/iwooos/wazuh` 尚未部署,因此沒有真正讀到 Wazuh manager 的 agent count、agent status、last seen 或 event refs。
|
||||
|
||||
本輪只讀證據顯示:110 與 188 的 Wazuh agent 服務仍在執行,且都與 112 的 Wazuh manager port `1514` 保持連線;112 的 Wazuh manager、indexer、dashboard 也都在執行。Dashboard 顯示用戶端消失的高機率原因,不是 110 / 188 agent 全部停止,而是 112 Dashboard 到 Wazuh API 的 stored API / 認證 / rate-limit / TLS trust 檢查層在 2026-06-24 23:14 CST 左右出現 `429 / 500`。
|
||||
|
||||
但 manager 端 agent registry 的真實清單尚未被獨立驗收,因為本視窗沒有 Wazuh API 只讀帳號,也沒有 112 root read 權限;因此 `wazuh_live_agent_registry_readback` 必須維持 `0`。
|
||||
|
||||
## 2. 只讀證據摘要
|
||||
|
||||
| 檢查面 | 證據 | 判定 |
|
||||
|--------|------|------|
|
||||
| IwoooS production route | `https://awoooi.wooo.work/api/iwooos/wazuh` 與 `/api/v1/iwooos/wazuh` 皆為 `404` | IwoooS 尚未讀到 Wazuh live metadata |
|
||||
| 公開 Wazuh domain | `wazuh.wooo.work` 未形成可用公開入口 | 不可用公開 domain 代表 Wazuh runtime 狀態 |
|
||||
| 110 agent | `wazuh-agent.service` active running;啟動於 2026-06-23 14:50 CST;`/var/ossec/etc/client.keys` 存在且為 1 筆本機 key | 110 agent 端未消失 |
|
||||
| 110 manager target | `ossec.conf` manager address 指向 `192.168.0.112` | 112 是 manager control plane |
|
||||
| 188 agent | `wazuh-agent.service` active running;啟動於 2026-06-23 14:50 CST | 188 agent 端未消失 |
|
||||
| agent 到 manager | 110 / 188 到 `192.168.0.112:1514` 皆有 ESTABLISHED 連線;`1514 / 1515 / 55000` targeted reachability 成功 | agent network path 正常 |
|
||||
| 112 control plane | `wazuh-manager`、`wazuh-indexer`、`wazuh-dashboard` 均 active running;啟動於 2026-06-23 14:48-14:51 CST;`NRestarts=0` | 112 服務沒有整體掛掉 |
|
||||
| 112 API endpoint | `https://192.168.0.112:55000/` 從本機、110、188 皆回 `401` | API 活著但需要認證 |
|
||||
| Dashboard 讀取層 | 2026-06-24 23:14 CST 左右 `/api/check-stored-api`、`/api/check-api` 出現 `429 / 500`,並記錄 Wazuh API check 異常 | Dashboard stored API / rate-limit / 認證 / TLS trust 檢查需維修 |
|
||||
| 23:20 後狀態 | 23:20 CST 後 Dashboard journal 無新增 429/500 | 可能是短時間檢查/登入造成的節流,但仍未驗收 agent registry |
|
||||
|
||||
## 3. 為什麼前一版沒有擋住
|
||||
|
||||
1. IwoooS 先前只建立 readback plan、前台卡與 release gate,沒有真正接 Wazuh manager agent registry。
|
||||
2. `active_runtime_gate=0` 是正確邊界,但前台文案容易讓人誤會「Wazuh 已整合」等於「agent 消失會被抓到」。
|
||||
3. 缺少 production 只讀 API:`agent_total`、`agent_active`、`agent_disconnected`、`last_seen_present` 都沒有 live readback。
|
||||
4. 缺少 no-false-green 告警:Dashboard 429/500、Wazuh API 401、agent 連線存在、IwoooS route 404 這些狀態沒有被合成一張 AI 事件卡。
|
||||
5. 缺少 owner evidence:誰在 2026-06-23 14:48 後建立、重啟、登入或調整 112/Wazuh,尚未有脫敏 owner 回覆。
|
||||
|
||||
## 4. 立即凍結邊界
|
||||
|
||||
在 manager 端 agent registry 被只讀驗收前,以下全部維持禁止:
|
||||
|
||||
- 不重啟 `wazuh-manager`、`wazuh-indexer`、`wazuh-dashboard`。
|
||||
- 不重新註冊 agent、不重產 `client.keys`、不刪 agent。
|
||||
- 不改 Wazuh API 使用者、stored API、憑證、TLS、rate-limit 或 Dashboard 設定。
|
||||
- 不改 firewall、Nginx、WireGuard、Docker、systemd、K8s、ArgoCD。
|
||||
- 不把 Dashboard 空白、Dashboard 恢復、agent active、route 200、IwoooS UI 可見當成事件結案。
|
||||
- 不收 Wazuh 密碼、token、cookie、private key、raw log、raw payload 或截圖中的敏感資訊。
|
||||
|
||||
## 5. 修復與納管優先順序
|
||||
|
||||
| 優先 | 工作 | 驗收條件 | 目前完成度 |
|
||||
|------|------|----------|------------|
|
||||
| P0-A | Wazuh manager agent registry 只讀驗收 | owner 提供脫敏 `agent_total / active / disconnected / last_seen` ref,或經 server-side secret metadata 啟用 IwoooS 只讀 API | `40%` |
|
||||
| P0-B | Dashboard stored API / rate-limit / TLS trust 修復 gate | 查明 `/api/check-stored-api` 429/500 根因;維修前有 owner、rollback、postcheck;維修後 Dashboard 與 API count 一致 | `35%` |
|
||||
| P0-C | IwoooS live metadata route 正式部署 | `/api/iwooos/wazuh` 不再 404,回傳 schema `iwooos_wazuh_readonly_status_v1`,不洩漏 agent identity / internal IP / secret | `55%` source-side、`0%` production |
|
||||
| P0-D | Wazuh agent disappearance alert card | 產出 `ai_automation_alert_card_v1`,包含 agent count delta、Dashboard API status、manager health、next gate、owner | `20%` |
|
||||
| P0-E | 112/Wazuh owner response | 回覆 owner role/team、decision、reason、affected scope、redacted evidence refs、rollback owner、followup owner | `0%` |
|
||||
| P1-A | 110/188 agent receipt heartbeat | 每台 host 定期只讀確認 service active、manager target、1514 established、last evidence ref | `45%` |
|
||||
| P1-B | Dashboard no-false-green | Dashboard 429/500 或 Wazuh API check failure 要進 IwoooS incident,不可顯示綠燈 | `15%` |
|
||||
|
||||
## 6. 下一步
|
||||
|
||||
1. 請 Wazuh/112 owner 補脫敏 agent registry evidence:`agent_total`、`active`、`disconnected`、`never_connected`、`last_seen` 時間窗,不提供密碼或 raw payload。
|
||||
2. 啟用 IwoooS `/api/iwooos/wazuh` 前,先完成 production route readback、server-side env owner、secret source metadata、readonly account scope 與 rollback owner。
|
||||
3. 若 owner 批准維修 Dashboard stored API,必須先做 read-only preflight:rate-limit 現況、stored API 指向、TLS trust、API user scope、Dashboard 與 manager 版本、回滾方式。
|
||||
4. 補 IwoooS AI 事件卡:當 Dashboard 顯示 agents 空白但 110/188 agent 仍 connected 時,分類為 `wazuh_dashboard_api_readback_degraded`,而不是 `all_agents_missing`。
|
||||
|
||||
## 7. 完成度
|
||||
|
||||
- 現場只讀鑑別:`70%`。
|
||||
- 真正 agent registry 驗收:`0%`。
|
||||
- IwoooS live readback production:`0%`。
|
||||
- Dashboard stored API 修復:`0%`。
|
||||
- SOC / Wazuh no-false-green 納管:`35%`。
|
||||
- active response / host write / auto block:`0%`,保持關閉。
|
||||
Reference in New Issue
Block a user