feat(sync): keycloak as source-of-truth with auto catalog sync and token refresh

This commit is contained in:
Chris
2026-04-03 00:46:46 +08:00
parent 7986160d9e
commit 7660c662a5
18 changed files with 773 additions and 174 deletions

View File

@@ -1,7 +1,7 @@
# Backend TaskPlan
## 待辦
- [ ] Keycloak 同步器改版Company/Site group 同步、System client role 同步、Site 角色套用同步。
- [ ] Keycloak 同步器優化Company/Site group 同步、System client role 同步、Site 角色套用同步(含效能與重複同步抑制)
- [ ] 補齊 pytest API 測試CRUD、關聯、同步、刪除、錯誤碼
- [ ] 補一支「一鍵重建 schema」腳本`init_schema.sql`)。
@@ -18,3 +18,6 @@
- [x] 保留 `api_clients` 白名單管理 API。
- [x] Keycloak OIDC 登入主流程。
- [x] `/admin/*` Bearer + admin 群組白名單安全線。
- [x] 公司/站台 CRUD 同步 Keycloak Groupcreate/update/delete
- [x] Keycloak -> DB 補齊同步(公司/站台/系統/角色/使用者)。
- [x] 系統改為 Keycloak 唯一來源(後台停用 system CRUD