feat(auth): 添加 M0A.5a 正式认证基础(重提 #83)#88
Open
wangjk9527 wants to merge 2 commits into
Open
Conversation
实现 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 合入而不依赖部署目录。
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
upstream/main重提原 #83:落地 M0A.5a 正式 password 认证基础(注册策略、公开 URL / Cookie Secure 对齐、GET /api/v1/auth/status、登录防枚举、Web/TUI 会话 TTL、可恢复 CSRF 轮换)。createAuthenticatedTestClient();核心 HTTP smoke/seed 迁到 password 模式;CIcore-smoke-tests跑test:auth-foundation。ask_user/submit_plan在合成RUN_FINISHED前补齐TOOL_CALL_END。scripts/deploy的依赖;.env.example已含AUTH_REGISTRATION_MODE。不在范围:M0A.5b(TUI 登录)、M0A.5c(password-only 切流)、部署 PR #87。
对抗审查(复审后)
*+credentials(既有模式);open 注册 409 可枚举邮箱;口令最短 6;注册 UI 与registrationMode完全对齐留给 5cVerdict:可合并
Test plan
npm run test:auth-foundation(26 pass)npm run smoke:authnpx 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 typecheckCore Smoke TestsgreenNotes
devauth 仍保留;新测试不依赖它。