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

Abierto
#2,032 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
58/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
react, typescript

Línea de trabajo

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.

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

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
5
Forks
4
Merge medio
1 d 19 h
PR fusionados (30 d)
144

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

Todos los issues de HarperFast/studio

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.