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

未關閉
#5,931 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
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. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

NVIDIA/OpenShell 的其他 Issue

查看 NVIDIA/OpenShell 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。