Cluster sign-out leaves an instance signed in once its instanceFqdn disappears

Abierto Apto para principiantes
#2,021 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
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
77/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Empieza por src/lib/types/isInstance.ts y sigue cómo src/features/auth/store/authStore.ts deriva las claves de autenticación y cómo src/features/clusters/components/ClusterCard.tsx cierra la sesión de las instancias. Reproduce la secuencia descrita con una instancia que pierde su instanceFqdn; se considera terminado cuando el cierre de sesión del clúster borra su marcador de inicio de sesión, el usuario y la marca de Fabric Connect. En el issue no se menciona ningún archivo de prueba.

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

Descripción

Summary

Cluster Sign Out cannot clear an instance's sign-in once that instance comes back from central manager without an instanceFqdn. Its sign-in marker, user and Fabric Connect flag survive until the user signs out of the app.

Cause

authStore.setUserForEntity (src/features/auth/store/authStore.ts, ~line 359) returns early when calculateIdFromEntity or calculateKeyFromEntity yields nothing. Both decide "is this an instance?" with isInstance (src/lib/types/isInstance.ts), which is !!instance.instanceFqdn. So an instance object without an FQDN is neither an instance nor a cluster to the store, and the cluster sign-out loop (src/features/clusters/components/ClusterCard.tsx, ~line 116) skips it.

The path: sign in to an instance while it has an FQDN, then a later GET /Cluster/<id> lists it without one (the shape behind #2020), then sign out of the cluster.

Impact

Same user only, and app sign-out still clears everything. Not observed in production; found by code trace during review of the #2020 fix, which closed the other route to this state (Fabric Connect to an instance that never had an address).

Suggested fix

Key an instance's auth by instance.id rather than by whether it has an FQDN: make isInstance discriminate on something an address-less instance still has (for example the ins- id prefix getInstanceClient already uses), or have cluster sign-out call signOutLocally(instance.id) directly.

Review-Deferral: 293e0b262f5c7343 severity=minor category=security

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

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

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.