- Custom Fields (FEAT-001): - CustomField and TaskCustomValue models with formula support - CRUD API for custom field management - Formula engine for calculated fields - Frontend: CustomFieldEditor, CustomFieldInput, ProjectSettings page - Task list API now includes custom_values - KanbanBoard displays custom field values - Gantt View (FEAT-003): - TaskDependency model with FS/SS/FF/SF dependency types - Dependency CRUD API with cycle detection - start_date field added to tasks - GanttChart component with Frappe Gantt integration - Dependency type selector in UI - Calendar View (FEAT-004): - CalendarView component with FullCalendar integration - Date range filtering API for tasks - Drag-and-drop date updates - View mode switching in Tasks page - File Encryption (FEAT-010): - AES-256-GCM encryption service - EncryptionKey model with key rotation support - Admin API for key management - Encrypted upload/download for confidential projects - Migrations: 011 (custom fields), 012 (encryption keys), 013 (task dependencies) - Updated issues.md with completion status 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1.8 KiB
1.8 KiB
MODIFIED Requirements
Requirement: File Encryption
系統 SHALL 對半導體敏感圖檔進行 AES-256 加密存儲。
Scenario: 自動加密判斷
- GIVEN 使用者上傳檔案至任務
- WHEN 該任務所屬專案的 security_level 為 "confidential"
- THEN 系統自動使用 AES-256-GCM 加密檔案
- AND 設定 is_encrypted = true 及 encryption_key_id
Scenario: 加密存儲
- GIVEN 專案設定為機密等級
- WHEN 使用者上傳檔案
- THEN 系統使用 AES-256 加密後存儲
- AND 加密金鑰安全管理
Scenario: 解密讀取
- GIVEN 使用者請求下載加密檔案
- WHEN 系統驗證權限通過
- THEN 系統解密檔案後提供下載
- AND 解密過程透明,使用者無感
Scenario: 串流處理大檔案
- GIVEN 使用者上傳或下載大型加密檔案
- WHEN 系統處理加密或解密
- THEN 使用串流方式處理避免記憶體溢出
- AND 效能損耗在可接受範圍內
Scenario: 金鑰輪換
- GIVEN 安全政策要求金鑰輪換
- WHEN 管理員執行金鑰輪換
- THEN 系統建立新金鑰並標記為 active
- AND 舊金鑰保留用於解密既有檔案
- AND 新上傳檔案使用新金鑰加密
Scenario: Master Key 管理
- GIVEN 系統需要加解密檔案
- WHEN 系統取得加密金鑰
- THEN 使用 Master Key 解密金鑰後使用
- AND Master Key 從環境變數讀取,不存於資料庫
Scenario: 加密操作稽核
- GIVEN 發生加密相關操作
- WHEN 操作完成
- THEN 系統記錄操作類型、金鑰 ID、檔案 ID、操作者、時間
- AND 日誌不可竄改
Scenario: 金鑰管理權限
- GIVEN 使用者嘗試管理加密金鑰
- WHEN 使用者不是系統管理員
- THEN 系統拒絕操作並返回 403 錯誤