No way to give an agent access to exactly one lease: tokens never expire and a shared token is one tenant

Đang mở
#1,407 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ó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
authentication

Hướng nghiên cứu

Start by reading ADR 0033 and locating tokenRecordSchema and the lease.request flow mentioned in the issue. Trace how tokens authorize lease routes and how lease endings and expiry are handled. Done means a credential can access only its lease for that lease’s lifetime; the issue also raises token expiry as a separate option.

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

Mô tả

request:new
The problem

A remote agent that needs one device gets a long-lived agent token. Tokens have no expiry (tokenRecordSchema: id, role, label, createdAt, workerId), and every agent that shares a token is one requester and one agent-device tenant, so it can see the others' sessions. To hand a device to a short-lived job safely we'd have to mint and revoke a token per job ourselves, and even then the token reaches more than that one lease.

Who runs into this

A coordinator or CI job that leases a device on behalf of an agent it doesn't fully trust (an agent working on a contributor's branch, a job on someone else's machine) and wants to give that agent access to exactly one device for exactly the lease's lifetime.

What you would like to happen

A credential scoped to one lease: valid only for that lease's routes (exec, stream, input, files, the agent-device front) and dead the moment the lease ends or expires. For example, lease.request could optionally return one alongside the lease. Separately, an optional expiresAt on tokens would help for anything that can't be scoped to a single lease.

Anything else

Workaround today: one agent token per binding, a requesterId per actor, and revoking tokens by hand. ADR 0033 gives proxy identities an expiresAt, which is close to what we'd want for tokens.

Ngôn ngữ chính
TypeScript
Star
705
Fork
40
Merge trung bình
12 giờ 9 phút
Pull request đã merge (30 ngày)
376

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 callstackincubator/simlock

Tất cả issue của callstackincubator/simlock

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.