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

Abierto
#450 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
15/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go, kubernetes

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Go
Estrellas
5
Forks
3
Merge medio
1 h 50 min
PR fusionados (30 d)
160

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de coder/coder-k8s

Todos los issues de coder/coder-k8s

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.