M4-T07: add admin_cli disable-totp and reissue-totp escape commands

This commit is contained in:
tliu93 committed 2026-06-21 22:27:07 +02:00
1 parent 81bd32f613
commit 51da8c5716
3 files changed
+345 -7

No files matched your search

+1 -1
View File
@@ -224,7 +224,7 @@ Phase B(TOTP,可选配)
- **Reviewer checklist**: `totp_required` 时确未发 cookie;恢复码消费后不可复用;通用错误不泄露细节。
### M4-T07 — CLI disable-totp / reissue-totp
- **Status**: `todo` · **Depends**: M4-T04(逻辑上配合 T03 的 CLI 骨架)
- **Status**: `done` · **Depends**: M4-T04(逻辑上配合 T03 的 CLI 骨架)
- **Files**: `modify scripts/admin_cli.py`;`modify tests/test_admin_cli.py`
- **Steps**: `disable-totp <username>`:`totp_enabled=false` + 清 secret + 删恢复码(**不需任何恢复码即可执行**);`reissue-totp <username>`:生成新 secret(可选打印新 URI)。
- **Out of scope / 不要碰**: 不碰用户数据表。