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

Offen
#1,981 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
56/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
typescript

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
TypeScript
Sterne
5
Forks
4
Ø Merge
2 T. 13 Std.
Gemergte PRs (30 T.)
60

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus HarperFast/studio

Alle Issues in HarperFast/studio

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.