Skip to content

Draft:強化驗證、授權與稽核安全 - #15

Draft
evaeva12021202-sys wants to merge 6 commits into
mainfrom
security/auth-foundation
Draft

evaeva12021202-sys wants to merge 6 commits into
mainfrom
security/auth-foundation

Conversation

@evaeva12021202-sys

@evaeva12021202-sys evaeva12021202-sys commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

目標

在擴充 AI 決策功能前,先完成第一階段的驗證、登入保護與可追溯性安全基礎。

此 PR 已完成

  • 將自訂 SHA-256 密碼雜湊改為 Argon2id;舊帳密成功登入後會透明升級。
  • 新增登入失敗節流、暫時鎖定與安全稽核事件。
  • 部分敏感後端流程已要求有效的 Principal 與 capability 驗證。
  • 新增僅管理者可讀取的「安全稽核紀錄」頁面,可依帳號、事件與日期篩選,且不顯示密碼或雜湊。
  • LINE 入口不要求帳號綁定,固定採用受限的 warehouse 權限;寫入與危險操作仍由後端拒絕。
  • 補齊密碼、登入鎖定、稽核頁、授權邊界與 LINE 工具白名單的測試。

驗證結果

  • 本機安全相關測試:26 passed
  • GitHub CI:1 / 1 checks passed

已知限制/後續工作

  • 部分舊模組仍使用依賴 Streamlit session 的 check_permission();非 Streamlit 入口的權限檢查尚未完全統一為 Principal/capability,需在後續 PR 修正為「缺少已驗證身分即拒絕」。
  • 正式使用 LINE 前,應恢復 LINE User ID 與 ERP 帳號的身分綁定。

不包含的範圍

  • SSO 或外部 IAM
  • PostgreSQL 遷移
  • 共用資料庫多租戶
  • AI 決策證據與可解釋性
  • 外部 ERP outbox 或 worker 架構

審查說明

這是一個 Draft PR;完成必要審查後才會標示為可供正式審查。

This document outlines the Security Foundation Improvement Plan, detailing phases for enhancing identity, authorization, and LINE integration boundaries, along with acceptance criteria and out-of-scope items.
@evaeva12021202-sys evaeva12021202-sys changed the title Draft: strengthen authentication and LINE identity boundaries Draft:強化驗證與 LINE 身分識別界線 Sep 13, 2026
@evaeva12021202-sys evaeva12021202-sys changed the title Draft:強化驗證與 LINE 身分識別界線 Draft:強化驗證、授權與稽核安全 Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant