bug(sdk/ts): forward().close() never revokes SSH session tokens of open connections
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 62/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- api
调研方向
从 sdk/typescript/src/client.ts 中的 forward、teardown 和 forwardConnection 开始,跟踪每个连接的 AbortController 信号如何到达调用 revokeSshSession 的 finally 代码块。检查 Go 文件客户端中的撤销调用,确认其预期的独立上下文。复现方法:打开一个连接,关闭句柄,然后确认没有发送 RevokeSshSession 请求。当每个已签发的令牌即使在连接信号被中止后,仍能收到带有各自超时时间的撤销请求时,即完成。
由索引模型根据 Issue 内容生成。
描述
User Story
I use OpenShell and build automation against its SDKs. I found this while reviewing sdk/ on main; it is identified from the code paths cited below and has not yet been reproduced against a live gateway.
Problem Statement
On close() (or caller abort), teardown aborts each connection's AbortController. forwardConnection's finally then calls revokeSshSession({ token, allowMissing: true }, { signal }) with that same, already-aborted signal, so the revoke RPC is never sent. The Go file client revokes with a fresh background context.
Impact / Why This Matters
Every SSH session token minted for connections still open at close() stays valid until it expires instead of being revoked, contrary to the method's documented revoke-on-close behavior.
Acceptance Criteria
- Closing a forward handle with open connections issues
RevokeSshSessionfor each minted token (bounded by its own timeout, independent of the aborted connection signal).
Reproduction Steps
const h = await client.sandbox.forward(name, { targetPort }).- Open a local connection so a session token is minted.
await h.close().- Observe no
RevokeSshSessionRPC reaches the gateway for that token (the call rejects immediately on the aborted signal).
Suggested UX (if applicable)
No response
Environment
- OpenShell:
main@ 82977e2 (2026-10-13) - SDK: TypeScript (
sdk/typescript/src/client.ts,forward/forwardConnection) - Toolchain: Go 1.25.4 linux/amd64, Node 22
Logs
- 主要语言
- Rust
- 星标
- 15.4k
- 派生
- 1.7k
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 374
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA/OpenShell 的其他 Issue
-
state:triage-needed
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
bug(sdk/go): edge (Cloudflare Access) token is cached for the client lifetime and never reloaded未关闭state:triage-needed
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
state:triage-needed
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
state:triage-needed
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
docs(upgrade): no migration notes for 0.1.1, 0.1.2, or 0.1.3 (only the 0.1.0 page exists)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭state:triage-needed
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
cmlarsen/writemorebetter#158 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 62/100
scanaislop/aislop#482 ·
维护者通常 1 天内回复
-
docs(skills): issue-first should reference an existing Linear ticket instead of filing a duplicate未关闭documentation
难度 1/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复