feat: API Key 系统 — CRUD + panel_auth 集成 + 持久化

新增:
- services/web_panel/routes/apikeys.py — 创建/列表/删除 API Key
- panel_auth() 双重验证: Session Store → API Key fallback
- _check_plugin_auth() 支持 API Key
- API Key 持久化到 SenSuDB (config_kv 表)
- 格式: sk- + 48 hex chars
- 脱敏显示 (前8后4)
- 删除后立即失效 (401)

WebPanelManager 注册 apikeys 路由

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
qinglong
2026-06-13 14:25:55 +08:00
parent e88d472c63
commit 9f6eb29820
6 changed files with 152 additions and 9 deletions
+1 -1
View File
@@ -89,6 +89,6 @@ commands:
permissions:
- framework.command.test
source: internal
last_updated: 12807.090239176
last_updated: 13895.634814802
plugin_commands: {}
total_commands: 18
+1 -1
View File
@@ -1,4 +1,4 @@
http_port: 4200
last_updated: 12807.105822092
last_updated: 13895.658168292
plugin_routes: {}
websocket_port: 4240