[RUM] Finish Setup shows the admin-user form to cluster updaters who can't receive the temporary password — every submit fails

Aperta
#2,032 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
react, typescript

Direzione di ricerca

Start with FinishSetup.tsx, useInstanceResetPasswordMutation.ts, and the permission flow in ClusterHome.tsx and ClusterCardAction. Check how loaded cluster data exposes resetPassword and instance tempPassword, then trace the existing PendingOwnerSetup state. Done means users without a temporary password see that message and are not redirected to the form; verify the affected setup flows with the relevant tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

rum

What RUM shows

Error: You may not have permission to set the password on this cluster. (@error.source:console, production fabric.harper.fast, /finish-setup).

  • 2026-10-26: 3 events in one session, 75 seconds apart. The user submitted the Create Admin User form three times and got the same error each time.
  • 2026-09-29: 1 event in a different session.
  • Nothing else in the 30-day window. Low volume, but each hit is a user stuck on a newly created cluster.

Stack (prod v2.202.2): mutationFn @ index-*.js → TanStack Mutation.execute, i.e. it is thrown by the guard at the top of onInstanceResetPassword, before any network request.

Root cause

Studio and central manager use two different permission rules for this page.

  • Studio's rule for showing the form is cluster update. ClusterHome.tsx:69-79 and ClusterCardAction send any user with update into Finish Setup (useOrganizationClusterPermissions → memberClusterPermissions, src/hooks/usePermissions.ts:131). That includes per-cluster update grants and the staff permission cluster:update.
  • Central manager's rule for returning tempPassword is stricter: super user, org admin, or the staff permission CLUSTER_CREDENTIALS (canSeeInstanceCredentials, central-manager src/lib/sharedHelpers.js:135, applied in src/resources/cluster/Cluster.js:185).

So a member with cluster update who is not an org admin (or a staff account with cluster:update but without CLUSTER_CREDENTIALS) gets the form, but cluster.instances[].tempPassword is missing. FinishSetup.tsx:58 passes tempPassword: undefined and the mutation throws useInstanceResetPasswordMutation.ts:43 on every submit. The form looks usable and gives no hint of who can complete setup.

Suggested fix

Make the two rules agree. On the Studio side, once the cluster has loaded with resetPassword set and no instance has a tempPassword, show the existing PendingOwnerSetup message ("an org admin needs to finish setup") in place of the form. Gating on whether the credential is present, not on a re-implementation of central manager's rule, keeps Studio correct if that rule changes. Also tighten the redirect in ClusterHome/ClusterCardAction so these users are never sent to the form.

Found by the daily Datadog RUM review.

Lingua principale
TypeScript
Stelle
5
Fork
4
Merge medio
1g 19h
PR unite (30g)
144

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di HarperFast/studio

Tutte le issue di HarperFast/studio

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.