Files
watchman/.task/2026-11-17/m02-auth/reviews/reviewer-m02-token-login.md
T
unknownandCursor f8e1c77bd3 feat(auth): 用 Casdoor 校验地址令牌并完成 M02
HXOPS 打开带 token 的地址时,前端只把令牌交给后端,后端向 Casdoor userinfo 校验。D20 接受该实例上任意仍然有效的访问令牌。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-17 19:41:31 +08:00

9 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Review — M02 地址令牌登录
- 审查:[M02 token login review](e5113ddc-6c2c-4e01-8e00-2381e1b5e072),claude-opus-5-thinking-high。结论:BLOCKED。
- 代码路径与已确认行为一致:前端只发现 `?token=` 并交给 `POST /auth/token-login`;后端只拿该令牌请求 Casdoor userinfo。没有本地白名单,也没有把令牌写进日志、会话或响应。`POST /auth/hxops-entry` 仍要求 `casdoor_sub`,这次 diff 没有改它。
- 审查当时重跑:pytest 58 passed,前端 unit 10 passed,`vue-tsc` 通过。Playwright 4 passed 是主 Agent 在同一工作区重跑的,审查没有再跑。
- 必改不是实现方式,而是口径:`authenticate_bearer` 只证明令牌在这套 Casdoor 上仍然有效,不核对是哪个应用签发的。同一实例里其他应用的访问令牌,只要用户有 Watchman 角色,就能换到 Watchman 会话。签名断言那条路径会核对 issuer 和 audience,这条不会。标 DONE_LOCAL 前要用户选择:只接受指定应用的令牌,或明确接受该 Casdoor 实例上任意仍然有效的访问令牌。见 O11。未替用户做这个决定。
- 审查看到的 `docs/progress.md` 和 `docs/runbook.md` 还是旧的 HXOPS 按钮口径。这两处已在审查之后改成地址令牌。任务记录当时仍停在 S2/S6,已补到当前收尾。
- 2026-11-17 用户确认 D20:接受该 Casdoor 实例上任意仍然有效的访问令牌。审查要求的决定已经落地,没有为此改校验代码。