feat(server): register standard gRPC reflection on the primary listener
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- grpc, rust
- 領域
- api, authentication, backend, documentation, testing
調査の方向性
/grpc.reflection. に対する認証バイパスと、プライマリリスナーおよび callback-only リスナーを対象とするリスナーテストから始め、次に openshell_core::FILE_DESCRIPTOR_SET と gateway サーバーの登録エントリポイントを調査します。実行中の gateway と reflection クライアントを使って reflection サービスの動作を検証し、期待されるサービス、認証、callback リスナーの拒否を確認します。最後に、要求された grpcurl のドキュメントを追加し、#2569 の health サービスの作業は分離しておきます。
索引モデルが issue の本文から書いたものです。
説明
User Story
As an API developer or operator, I want the gateway to serve standard gRPC reflection on its primary listener, so that supported tools can discover services and message descriptors without a separately distributed descriptor file.
Problem Statement
The gateway authentication and listener-routing code recognizes gRPC reflection paths as unauthenticated on the primary listener, and the build already produces a complete descriptor set. The server does not register a standard reflection service, so requests routed through that exception reach no implementation.
Impact / Why This Matters
Tools such as grpcurl, schema browsers, and integration diagnostics cannot discover the live gateway API. The existing unauthenticated routing rule suggests reflection is supported when it is not. Developers must locate matching source protos or descriptor artifacts and ensure they correspond to the running gateway version.
Proposed Design
Register the standard gRPC reflection v1 service on the primary gateway listener using the descriptor set produced by the existing protobuf build. Reflection remains unavailable on callback-only listeners and follows the existing unauthenticated primary-listener policy.
Expose all intentionally discoverable public services while excluding any service that is not actually routed by that listener. Document the security and deployment behavior.
Acceptance Criteria
- Standard gRPC reflection v1 is served on the primary listener.
- Reflection returns descriptors for every intentionally discoverable service routed by that listener.
- Callback-only listeners reject reflection using their existing protocol-appropriate response.
- Reflection does not require OIDC or mTLS user authentication on the primary listener, matching the documented policy.
- An integration test uses a reflection client against a running gateway and enumerates expected services.
- Documentation includes a minimal
grpcurldiscovery example and explains listener/auth behavior. - Standard health service work remains independently tracked in #2569.
Alternatives Considered
Remove reflection from the unauthenticated routing allowlist and distribute descriptor files only. This avoids serving reflection but provides a poorer diagnostics workflow and requires artifact/version coordination. Implement a custom schema endpoint. Standard reflection already has broad tooling support and avoids another OpenShell-specific contract.
Agent Investigation
The auth bypass includes /grpc.reflection., listener tests expect reflection on the primary listener and reject it on callback-only listeners, and openshell_core::FILE_DESCRIPTOR_SET contains the compiled descriptors. No reflection service dependency or registration is present.
Related: #2565, #2569. Source audit: https://gist.github.com/mrunalp/e80942c1544a0225ee588796a41ab30b.
- 主要言語
- Rust
- スター
- 8.7k
- フォーク
- 1.3k
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 297
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/OpenShell のほかの issue
-
area:docs
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
state:triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
area:cli state:validated
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
state:triage-needed
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
area:build spike state:review-ready state:stale
難易度 2/5 半日 初心者へのやさしさ 68/100
NVIDIA/OpenShell の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
state:needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
zed-industries/zed#64680 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
RustPython/RustPython#8802 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
TheLarkInn/aipm#2390 ·