feat(vault): 凭据库(密码+2FA 动态码)与 MASTER_KEY 密钥托管

credentials 表为登录凭据唯一事实源(站点×登录方式,含 oauth/2FA);账号密码读写重定向凭据层并幂等迁移历史数据;TOTP 按 RFC6238 零依赖自实现,绑定需当前动态码校验;Key Escrow 防 MASTER_KEY 遗失;前端新增凭据库视图与账号 2FA 联动。64 pytest + 16 浏览器端到端验证通过。
This commit is contained in:
gouki
2026-09-05 15:54:41 +00:00
parent 2fbb658126
commit d711ad5827
26 changed files with 2529 additions and 35 deletions
+11
View File
@@ -0,0 +1,11 @@
"""pytest 全局配置:确保项目根在 sys.path
tests/ 无 __init__.pypytest prepend 模式只会把 tests/ 加入 sys.path
直接运行 `pytest` 时 import app 会失败(python -m pytest 因 cwd 入 path 才可用)。
此文件让两种运行方式行为一致。
"""
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent))