VS Code: a revocation whose save failed lasts until the broker window closes, not until Dormouse quits

Đang mở
#1,484 1 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
documentation, security

Hướng nghiên cứu

Start by reading docs/specs/remote-security-model.md (Revocation section) and lib/src/host/remote/service.ts around lines 539 and 1199 to see how #unsavedRevocations and the error text work. Note vscode-ext/src/burrow.ts starts the service only in the broker window. Done depends on maintainer's call: either edit those texts or hand pending revocations to the next broker.

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

Mô tả

In VS Code, a phone revocation whose ACL save failed lasts only as long as the broker window, not until Dormouse quits. docs/specs/remote-security-model.md → "Revocation" says "quitting Dormouse before one undoes it". The error the user sees says "refused until Dormouse quits". In VS Code, closing one window is enough.

How it happens. #unsavedRevocations is held in memory on a single BurrowService (service.ts#L539). VS Code runs that service only in the broker window (startService in vscode-ext/src/burrow.ts). When the broker window closes and another window takes over, the new service loads the stored ACL, which never received the revocation, so the revoked phone is paired again. Standalone runs one sidecar per app, so the spec's wording is accurate there.

This only happens after an ACL save has already failed, which is rare. Two directions, and the choice is a maintainer's:

  • Narrow the promise. Change the spec sentence and the error text to say the refusal lasts until the window running remote control closes, or until Dormouse quits.
  • Keep the promise. Hand pending revocations to the next broker, either through the peer link at handoff or a small separate record. A record has to be written somewhere, and the ACL write just failed, so this is the larger change.
A related note from the same review of #1459 (not a bug)
  • The public BurrowService.revoke (service.ts#L1172) has no caller, tests included. Settings and dor remote revoke both go through #revokeDevice. security-remote.md S292 and the spec's passkey-target sentence name it as the entry point.
Ngôn ngữ chính
TypeScript
Star
5
Fork
1
Merge trung bình
13 giờ 37 phút
Pull request đã merge (30 ngày)
450

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 diffplug/dormouse

Tất cả issue của diffplug/dormouse

Issue tương tự

Thêm issue về TypeScript

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.