🤖 CoderWorkspacePool Share mode: optionally stop the workspace when a share is revoked

Đang mở
#450 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
15/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ệ
go, kubernetes
Lĩnh vực
infrastructure

Hướng nghiên cứu

The payload names no code files, only the ShareRevoked and ShareRemoved messages, the pool how-to and plan section 6.2 step 11, all referenced from #446. Start by reading those, then the discussion threads it links. Done means a settled design for an opt-in stop after revocation, including a decision on ShareRemoved, crash-safe state, and active-build handling. Implementation should wait for that design.

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

Mô tả

Problem

When the share policy no longer allows a share, the operator removes the Coder user from the workspace ACL and the claim reports ShareRevoked (#446). Coder also drops shares itself, for example when an admin tightens the organization's sharing setting (ShareRemoved). In both cases, Coder applies the removal only after the workspace restarts (Shared workspaces: "The workspace must be restarted for the user or group removal to take effect"). The operator does not restart or stop the workspace, so the user keeps access until someone does. A claimed workspace can run for a long time: a template with a default TTL of 0 has no autostop, and claims.idleTimeoutSeconds is opt-in.

Found by the Codex reviews of #446 (normal P1 and security P2): https://github.com/coder/coder-k8s/pull/446#discussion_r4433811754 and https://github.com/coder/coder-k8s/pull/446#discussion_r4433811122

Current behavior (#446)

The ShareRevoked and ShareRemoved messages and the pool how-to say that the user keeps access until the workspace restarts or stops. They tell the admin to restart or stop the workspace in Coder, or to delete the claim, to end the access at once. This matches Coder's own unshare, which also leaves the restart to a person.

Option

An opt-in setting on the pool or the control plane: after a revocation, the member stops the workspace with the operator token, confirms the stop build, and only then reports the share as revoked. This needs:

  1. A crash-safe state between the ACL removal and the confirmed stop, so a lost status write still leads to the stop.
  2. Handling of an active build (cancel with expect_status, as the member's delete cleanup does).
  3. A decision for ShareRemoved, where Coder or a person removed the share.
  4. A Kind check in P9 that the user loses an open session.

It interrupts the claimant's session, so it stays opt-in. It changes plan 6.2 step 11, where a bound member only watches its workspace. Refs #153.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: xhigh

Ngôn ngữ chính
Go
Star
5
Fork
3
Merge trung bình
1 giờ 50 phút
Pull request đã merge (30 ngày)
160

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 coder/coder-k8s

Tất cả issue của coder/coder-k8s

Issue tương tự

Thêm issue về Go

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.