WeKnora/internal/utils
AndyYang 6c69de2df1 feat(security): add AES-256-GCM encryption for API keys at rest
- Add crypto utility (internal/utils/crypto.go) with AES-256-GCM encrypt/decrypt
  using SYSTEM_AES_KEY env var, with "enc:v1:" prefix for versioned ciphertext
- Encrypt tenant API key via GORM BeforeSave/AfterFind hooks and manual
  encryption in CreateTenant/UpdateAPIKey (db.Updates bypasses hooks)
- Encrypt model API key in ModelParameters Value/Scan (driver.Valuer)
- Widen api_key column from varchar(64) to varchar(256) across all DB dialects
  (MySQL, ParadeDB, SQLite) and add versioned migration 000018
- Propagate SYSTEM_AES_KEY through docker-compose, Helm secrets and values
- Fix migration 000017 PL/pgSQL dollar-quoting syntax ($ -> $$)
2026-03-09 10:35:07 +08:00
..
crypto.go feat(security): add AES-256-GCM encryption for API keys at rest 2026-03-09 10:35:07 +08:00
debug.go feat: 使用增强的任务ID生成器替换UUID 2026-01-14 17:09:19 +08:00
filesize.go feat: 添加可配置的文件上传大小限制 2025-12-30 14:35:10 +08:00
httputil.go feat: enhance document loading and state management in doc-content component 2026-03-02 21:21:49 +08:00
inject.go feat: implement automatic soft-delete filtering in database queries 2026-03-03 22:23:23 +08:00
inject_test.go refactor: Centralize and simplify SQL validation logic 2026-01-21 20:39:37 +08:00
json.go feat: Add DataSchema tool for retrieving schema information from CSV and Excel files 2025-12-29 20:03:51 +08:00
security.go refactor: simplify image handling in _resolve_images function 2026-03-03 22:23:23 +08:00
taskid.go feat: 使用增强的任务ID生成器替换UUID 2026-01-14 17:09:19 +08:00