docs(governance): advance mainline to identity RBAC

This commit is contained in:
ogt
2026-07-11 20:46:55 +08:00
parent 8ef25db9bd
commit 2dcc2122c4
2 changed files with 8 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
# PChome 業績成長自動化作戰系統 — AI 競價情報模組 Single Source of Truth
> **最後更新**: 2026-07-11 (台北時間)
> **狀態**: 🟠 Partial。四 Agent、PixelRAG、MCP/RAG registry、PChome controlled-preview families 與多項 smoke/readback 已建立access control、database identity/RBAC、full asset reconciliation、software supply chain、same-run controlled apply、restore drill、internal RAG canary 與 MCP/RAG runtime closure 尚未全部完成。任何局部 receipt 不得代表整體閉環完成。
> **狀態**: 🟠 Partial。SEC-P0-001 deny-by-default access control 已完成 production closure四 Agent、PixelRAG、MCP/RAG registry、PChome controlled-preview families 與多項 smoke/readback 已建立但 database identity/RBAC、full asset reconciliation、software supply chain、same-run controlled apply、restore drill、internal RAG canary 與 MCP/RAG runtime closure 尚未全部完成。任何局部 receipt 不得代表整體閉環完成。
> **適用版本**: V10.787
---
@@ -14,9 +14,9 @@
- `services/security_governance_review_service.py``scripts/ops/report_security_governance_review.py``/api/ai-automation/security-governance-review` 提供 machine-readable checks、completion、release gate 與 ordered work items。
- Gitea CD 必須執行 `report_security_governance_review.py --strict`,且不得解析 GitHub action/source/image。
- production 安全與治理完成度必須分開顯示 program、asset coverage、runtime closure目前結論是 partial不是 complete。
- 目前 ordered P0 以 `docs/guides/ai_automation_mainline_work_items.md` 為準:先關閉 access exposure,再做 identity/RBACwebhook trust、supply chain、asset reconciliation、controlled-apply envelope、internal RAG canary 與 MCP/RAG runtime closure。
- 目前 ordered P0 以 `docs/guides/ai_automation_mainline_work_items.md` 為準:SEC-P0-001 access exposure 已關閉current P0 是 identity/RBAC,之後依序為 webhook trust、supply chain、asset reconciliation、controlled-apply envelope、internal RAG canary 與 MCP/RAG runtime closure。
- V10.786 起 `/metrics` 不再是 public exception應用中央政策與 Nginx exact-match edge policy 僅允許 loopback / Docker transportPrometheus 必須以內部 canary 證明 target `up`,且 public/LAN readback 必須拒絕。監控 Compose 不得保存明文 Grafana 管理密碼Prometheus 對外埠預設只綁 loopback。
- V10.787 依 live ingress 修正 metrics transportproduction ingress 實際位於 188110 global Prometheus 只能經專用 `172.20.0.1:19191` Docker-only Nginx bridge 抓取bridge 以系統 CA、`mo.wooo.work` SNI/Host 轉送至 188應用僅額外允許 `192.168.0.110/32` 單一監控主機,不得放行整段 LAN也不得把 110 的其他 vhost 誤當 EwoooC production ingress。controlled apply 必須支援新 include 建立、Prometheus bind-mount reconciliation、`momo_app_info`/health/database product marker canary 與失敗自動移除/回滾;單純 HTTP 200target up 不得算 closure
- V10.787 依 live ingress 修正 metrics transportproduction ingress 實際位於 188110 global Prometheus 只能經專用 `172.20.0.1:19191` Docker-only Nginx bridge 抓取bridge 以系統 CA、`mo.wooo.work` SNI/Host 轉送至 188應用僅額外允許 `192.168.0.110/32` 單一監控主機,不得放行整段 LAN也不得把 110 的其他 vhost 誤當 EwoooC production ingress。controlled apply 支援新 include 建立、Prometheus bind-mount reconciliation、`momo_app_info`/health/database product marker canary、精確 scrape URL、worker reload convergence 與失敗自動移除/回滾production 已讀回 public 404、internal 200target up、Prometheus identity preserved、8/8 anonymous matrix 與 `momo-db` unchanged證據在 `governance/evidence/SEC-P0-001-20260711T122758Z.json`
- V10.777 起 web process 只能註冊 OpenClaw Blueprint不得在 import 或 `record_once` 啟動 APScheduler、timed jobs 或 embedding thread10 個 OpenClaw timed jobs 與唯一 embedding worker runtime owner 必須由 `momo-scheduler` 明確啟動。每日 04:15 的 codebase inventory 只掃描程式與前端資產並寫 artifact receipt不讀 secret、不寫業務 DB。
---

View File

@@ -1,8 +1,8 @@
# AI Automation Mainline Work Items
> Updated: 2026-07-10
> Updated: 2026-07-11
> Governance: `global_product_governance_v2` + ADR-038
> Current P0: `SEC-P0-001 deny-by-default access control`
> Current P0: `SEC-P0-002 database identity + least-privilege RBAC`
## Source Of Truth
@@ -16,8 +16,8 @@
| Order | ID | Status | Work item | Exit evidence / next machine action |
|---:|---|---|---|---|
| 1 | `SEC-P0-001` | In progress | Deny-by-default route access control | Production anonymous matrix now denies sensitive routes and all browser headers/Secure cookie pass. Remaining exit: move `/metrics` behind edge/internal auth without breaking Prometheus. Next: `move_metrics_behind_edge_auth_with_prometheus_canary`. |
| 2 | `SEC-P0-002` | Not started | Database identity + least-privilege RBAC | Replace shared admin password, default-admin fallback, process-local lockout and spoofable proxy identity. Exit: shadow auth, role matrix, durable audit/lockout, session revocation and canary cutover. |
| 1 | `SEC-P0-001` | Completed | Deny-by-default route access control | `governance/evidence/SEC-P0-001-20260711T122758Z.json` plus the current runtime receipt prove anonymous matrix 8/8 denied, public `/metrics` 404, exact internal target up, EwoooC product markers present, Prometheus identity preserved and `momo-db` unchanged. |
| 2 | `SEC-P0-002` | In progress | Database identity + least-privilege RBAC | Replace shared admin password, default-admin fallback, process-local lockout and spoofable proxy identity. Next: inventory active users and auth call sites, then shadow database-backed auth before bounded canary cutover. Exit: role matrix, durable audit/lockout, session revocation and production readback. |
| 3 | `SEC-P0-003` | In progress | Webhook trust and replay protection | Telegram secret-token verification code exists; production secret activation remains unproven. Exit: secret provisioned outside source, required mode enabled, invalid-secret 401 and authorized callback canary pass. |
| 4 | `SUPPLY-P0-001` | In progress | Gitea-only secure software supply chain | Gitea-native checkout, secret-safe `.dockerignore`, commit-bound source receipt and governance gate are active. Exit: exact dependency lock, internal SAST/SCA/secret scan, SBOM, image digest/provenance, vulnerability SLA and production digest readback. |
| 5 | `GOV-P0-001` | In progress | Canonical full asset graph + runtime reconciliation | `governance/ewoooc_asset_inventory.json` seeds hosts, services, data, AI, routes, supply chain, observability and recovery. Exit: same-run probe receipt for every asset; drift auto-creates work items. |
@@ -25,7 +25,7 @@
| 7 | `RAG-P0-001` | Not started | Internal RAG candidate canary | V10.770 stops at candidate preview. Exit: bounded pgvector candidate canary, signature/readback/feedback receipt, no price write and no premature `ai_insights` promotion. Next: `run_internal_rag_candidate_canary`. |
| 8 | `MCP-P0-001` | In progress | MCP/RAG production runtime closure | Registry and smoke wiring exist, but runtime flags/ports must be live. Exit: MCP servers healthy, router enabled, RAG enabled, approved caller/tool boundary and production query canary pass. |
| 9 | `SEC-P0-004` | Not started | Security operations lifecycle and metrics | Add durable security incident state and publish MTTA, MTTR, recurrence, false positive, human intervention, verifier pass, rollback and freshness. Exit: detect-to-learn production receipt. |
| 10 | `REL-P0-001` | In progress | Formal deploy and visible proof discipline | V10.773 records the controlled production fallback with `momo-db` unchanged. The prior Gitea CD run was cancelled by a newer push and the latest commit-bound run remains waiting because no `ewoooc-host` runner is online; exact run identity comes from Gitea/runtime receipts, not this roadmap. Exit: restore a dedicated EwoooC-only runner, replay the same commit and close CD/readback automatically. |
| 10 | `REL-P0-001` | In progress | Formal deploy and visible proof discipline | V10.787 is healthy and the SEC-P0-001 runtime loop is closed with `momo-db` unchanged; Gitea CD #1120 remains waiting because no `ewoooc-host` runner is online. Exit: restore a dedicated EwoooC-only runner, replay the current source and close CD/readback automatically. |
## P1