Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

bug(sdk/ts): forward().close() never revokes SSH session tokens of open connections

Đang mở Phù hợp với người mới
#4,516 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
62/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu tại sdk/typescript/src/client.ts với forward, teardown và forwardConnection, rồi theo dõi cách tín hiệu AbortController riêng của từng kết nối đi tới khối finally gọi revokeSshSession. Kiểm tra lệnh gọi thu hồi trong client tệp Go để xem ngữ cảnh độc lập được dự kiến. Để tái hiện, mở một kết nối, đóng handle và xác nhận không có yêu cầu RevokeSshSession nào được gửi. Hoàn thành khi mọi token đã cấp đều nhận được một yêu cầu thu hồi với timeout riêng, ngay cả sau khi tín hiệu của kết nối bị hủy.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

state:triage-needed
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 RevokeSshSession for each minted token (bounded by its own timeout, independent of the aborted connection signal).
Reproduction Steps
  1. const h = await client.sandbox.forward(name, { targetPort }).
  2. Open a local connection so a session token is minted.
  3. await h.close().
  4. Observe no RevokeSshSession RPC 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

Ngôn ngữ chính
Rust
Star
15.4k
Fork
1.7k
Merge trung bình
2 ngày 6 giờ
Pull request đã merge (30 ngày)
397

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/OpenShell

Tất cả issue của NVIDIA/OpenShell

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.