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

Aberta
#1,484 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Bug
Clareza
Precisa de esclarecimento
Status de atividade
Ativa
Stack de tecnologia
typescript

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.
Linguagem predominante
TypeScript
Estrelas
5
Forks
1
Merge médio
12h 58min
PRs com merge (30d)
482

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de diffplug/dormouse

Todas as issues de diffplug/dormouse

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.