Daemon: refuse leased requests that name no session at request admission
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- backend
调研方向
Start in packages/daemon/src/server/http/http-rpc-methods.ts around line 48, where a missing session is defaulted, and in packages/daemon/src/sessions/request-admission.ts around line 48, where the tenant-scoped default is built. Record whether the caller supplied a session before the default is applied. Done means an unnamed lease.allocate, and an unnamed leased command, are refused with REMOTE_SESSION_REQUIRED before allocation or dispatch, while named requests and daemons without a lease provider behave as before. Check the existing real-daemon tests for the session and lease paths, since the issue asks for the new tests to run against a real daemon. Linked PR #4177 is already open, so coordinate with it before starting.
由索引模型根据 Issue 内容生成。
描述
Follow-up from #3931 and #4159.
#4159 makes the CLI refuse every command on a leased remote connection unless it names a session (--session, AGENT_DEVICE_SESSION or config). The rule is enforced in the CLI, though. A review of #4159 found that direct daemon RPC callers are not covered: a request with no session becomes default, then <tenant>:default (packages/daemon/src/server/http/http-rpc-methods.ts:48, packages/daemon/src/sessions/request-admission.ts:48). Against an isolated real daemon, an unnamed authenticated agent_device.lease.allocate allocated a proxy lease, and unnamed leased commands reached normal dispatch.
Required behavior
- Daemon request admission records whether the caller supplied a session before it defaults one.
- A request that would allocate, use or release a lease from a lease provider, with no caller-supplied session, is refused with the same typed reason (
REMOTE_SESSION_REQUIRED) before allocation or dispatch. - Requests with no lease provider are unchanged.
- Tests run against a real daemon: an unnamed
lease.allocateis refused, an unnamed leased command is refused, and named requests are unaffected.
- 主要语言
- TypeScript
- 星标
- 5.2k
- 派生
- 359
- 平均合并
- 13 小时 23 分钟
- 30 天内合并 PR
- 655
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/agent-device 的其他 Issue
-
iOS alert wait: the last poll can get ~30 ms and turns "no alert" into a failed read可能已有人在做 @pcbeingused333 于 2 天前认领。 未关闭bug ready-for-agent
难度 2/5 1-3 小时 新手友好度 77/100
callstack/agent-device#4018 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
callstack/agent-device#1869 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 18/100
callstack/agent-device#4179 ·
维护者通常 1 天内回复
-
enhancement needs-triage
难度 4/5 3-5 天 新手友好度 35/100
callstack/agent-device#4162 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 43/100
callstack/agent-device#4110 · 2 条评论 ·
维护者通常 1 天内回复
查看 callstack/agent-device 的全部 Issue
相似的 Issue
-
mobile-app
难度 2/5 1-3 小时 新手友好度 74/100
Open-Locker/Open-Locker#352 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
leanprover-community/lean4game#589 ·
维护者通常 2 天内回复
-
check:passed streams:add
难度 1/5 1 小时以内 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复