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

オープン 初心者向け
#2,021 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
77/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript

調査の方向性

src/lib/types/isInstance.ts から始めて、src/features/auth/store/authStore.ts が認証キーをどのように導出するか、また src/features/clusters/components/ClusterCard.tsx がインスタンスをどのようにサインアウトさせるかを追ってください。instanceFqdn を失うインスタンスで、説明された一連の動作を再現してください。クラスタのサインアウトによってサインインマーカー、ユーザー、Fabric Connect フラグがクリアされれば完了です。issue ではテストファイルは指定されていません。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
5
フォーク
4
平均マージ
1日 20時間
マージ済み PR(30日)
140

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

HarperFast/studio のほかの issue

HarperFast/studio の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。