A Fabric Connect token whose user was dropped answers 403 until a reload

Aberta
#1,981 0 comentários 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
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
56/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
typescript

Direção de pesquisa

Start with src/integrations/api/retryExpiredOperationToken.ts and trace how the interceptor handles 401 responses and re-mints a Fabric Connect token. Check how operation errors expose USER_HAS_NO_PERMS and the token user's name; the issue says this specific 403 should trigger one recovery attempt. Done means this case recovers once while unrelated 403 responses do not, and the affected recovery behavior is covered by a test.

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

Descrição

Studio gets stuck when the user behind its Fabric Connect token is deleted:

  • Studio recovers a direct Fabric Connect token only on a 401 (src/integrations/api/retryExpiredOperationToken.ts:19).
  • The in-cluster guard skips re-establishing a connection that is already resolved (checkClusterInstanceAuthenticationBeforeLoad, the checkForFabricConnect && !hasResolvedFabricConnect branch).
  • Harper resolves a still-valid JWT for a dropped user to a principal with no role (harper v5.3.2 security/user.ts:576-581, 518-526).
  • Every operation then answers 403 OP_AUTH_PERMS_ERROR, with unauthorized_access: ["User <name> has no role or permissions..."] (utility/operation_authorization.ts:765), until a reload mints a new token.

#1979 closes the Finish Setup route into this state. Dropping the Fabric Connect principal any other way still reaches it, for example from the Users page or from another client. Fabric Connect resolves to Harper's first super user.

Fix idea: in the token-recovery interceptor, treat that specific 403 like an expired token and re-mint once. The specific 403 is USER_HAS_NO_PERMS naming the token's own user.

Found while root-causing #1979.

🤖 Generated by Anthropic Claude Code (Claude Opus 5.5); posted via @dawsontoth.

Linguagem predominante
TypeScript
Estrelas
5
Forks
4
Merge médio
2d 13h
PRs com merge (30d)
60

Preparar o ambiente

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 HarperFast/studio

Todas as issues de HarperFast/studio

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.