Bind Provider creation, update, and delete to exact resource identities

オープン
#5,931 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
grpc, rust, sqlite
領域
api, backend, security

調査の方向性

The Provider request messages are defined in proto/openshell.proto around lines 2392-2474; read those first, then the update and delete handlers in crates/openshell-server/src/grpc/provider.rs (lines 465-529 and 694-750). Trace how resource versions are currently checked and where the store is called, then identify tests for the gRPC provider service. Done means create/update/delete can enforce workspace incarnation, profile revision and provider ID preconditions before any credential write or delete, with an advertised capability and regression tests for same-name replacement.

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

説明

state:triage-needed

Codex report. A controller that owns Provider registration and retirement needs the Gateway to enforce the resource identities the controller authorized. The Gateway can resolve a different resource under the same name between the controller's read and its write. This follows up on inactive issue #2722 and adds the registration and retirement cases.

Reproduction

I used OpenShell Gateway 0.1.10-dev.100+g152c59d31, a disposable SQLite store, and synthetic credentials.

  1. Create a Provider in a Workspace and record its ID and resource version.
  2. As another authorized Workspace administrator, delete it and create a Provider under the same name. The two IDs differ and both initial versions are 1.
  3. Call UpdateProvider with the former Provider's ID, name, and version and a new synthetic credential. The Gateway returns the replacement's ID. An operator credential read confirms that the replacement received the update.
  4. Call DeleteProvider for the same name. The Gateway deletes the replacement. The delete request has no field for the original ID.

Requested behavior

  • On Provider creation, let the caller require the intended Workspace incarnation and profile revision. Refuse before storing material if either precondition fails.
  • On Provider update and delete, let the caller require the intended Provider ID. If a same-name replacement exists, refuse before changing its credential or deleting it. Preserve the existing resource version check for updates to the same Provider.
  • Expose a capability or RPC contract that lets clients require these guarantees before sending a write.

Provider request schema · Provider update implementation · Provider delete implementation

主要言語
Rust
スター
21.5k
フォーク
2.1k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

NVIDIA/OpenShell のほかの issue

NVIDIA/OpenShell の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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