Skip to content

feat(auth): 添加 M0A.5a 正式认证基础(重提 #83)#88

Open
wangjk9527 wants to merge 2 commits into
datagallery-lab:mainfrom
wangjk9527:cursor/m0a5a-formal-auth-foundation-f252
Open

feat(auth): 添加 M0A.5a 正式认证基础(重提 #83)#88
wangjk9527 wants to merge 2 commits into
datagallery-lab:mainfrom
wangjk9527:cursor/m0a5a-formal-auth-foundation-f252

Conversation

@wangjk9527

Copy link
Copy Markdown
Collaborator

Summary

  • 基于 upstream/main 重提原 #83:落地 M0A.5a 正式 password 认证基础(注册策略、公开 URL / Cookie Secure 对齐、GET /api/v1/auth/status、登录防枚举、Web/TUI 会话 TTL、可恢复 CSRF 轮换)。
  • 共享 createAuthenticatedTestClient();核心 HTTP smoke/seed 迁到 password 模式;CI core-smoke-teststest:auth-foundation
  • HITL 事件桥:ask_user / submit_plan 在合成 RUN_FINISHED 前补齐 TOOL_CALL_END
  • 不再叠部署分支:相对云端初版去掉对 PR feat(部署): Ubuntu/Debian 原生一键部署(DataLink 外置) #87 / scripts/deploy 的依赖;.env.example 已含 AUTH_REGISTRATION_MODE
  • 修复畸形 Cookie percent-encoding 导致 password 模式 API 500 的问题(测试锁住)。

不在范围:M0A.5b(TUI 登录)、M0A.5c(password-only 切流)、部署 PR #87

对抗审查(复审后)

级别 结论
P0 已关闭(曾叠过期部署提交 → 已 rebase 到 main)
P1 已关闭(畸形 Cookie → 500 → 已修并加测)
P2 保留:CORS *+credentials(既有模式);open 注册 409 可枚举邮箱;口令最短 6;注册 UI 与 registrationMode 完全对齐留给 5c

Verdict:可合并

Test plan

  • npm run test:auth-foundation(26 pass)
  • npm run smoke:auth
  • npx vitest run apps/api/src/interaction-runtime-adapter.test.ts(3 pass)
  • npm --workspace @datafoundry/agent-runtime exec -- vitest run src/tools/governed-tool-factory.test.ts(4 pass)
  • npm run typecheck
  • CI Core Smoke Tests green

Notes

wangjk9527 and others added 2 commits July 26, 2026 16:05
实现 password 模式会话/CSRF/注册策略,并修复 HITL 事件桥、cookie Path
与缺失注册策略静默 open 等确定性缺陷。脚本侧统一正式认证客户端,并为
FORMAL_HTTP_AUTH_TARGETS 增加 node --check 语法门禁。

基于 main reset 后重提原 datagallery-lab#83,叠在 DataLink 外置的一键部署分支之上。

Co-authored-by: wing <wangjk9527@users.noreply.github.com>
parseCookies 在 percent-encoding 非法时抛 URIError,会使 /api/v1/*
落入 500。改为跳过坏 cookie 项;部署 HTTP 脚本分类仅在文件存在时生效,
便于本分支直接基于 main 合入而不依赖部署目录。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant