bug(ocsf): attribute inspected HTTP requests to the policy that governs them

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

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

評価

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

調査の方向性

Start in crates/openshell-supervisor-network/src/proxy.rs at the plain HTTP forward proxy decision event that copies firewall_rule from TCP authorization, then read crates/openshell-supervisor-network/src/l7/relay.rs around HTTP policy evaluation, which currently returns only allow/reason. Trace how the deciding request rule can reach the OCSF HTTP Activity record, including no-match/no-single-rule outcomes. Reproduce with two policies on one host/port and a fresh connection sending a GET/PUT permitted only by the other entry; done when the record names the request-permitting entry.

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

説明

area:runtime topic:observability

User Story

I use OpenShell to monitor egress from agent sandboxes. I need the OCSF HTTP Activity record to identify the policy that governed each request so I can group activity by policy key.

Problem Statement

When multiple network policies permit a TCP connection to the same host and port, OpenShell can report the connection's policy key on the HTTP Activity record even though a different policy allowed the HTTP request. A single request on a fresh connection is enough to hit this. Reused connections can also carry requests governed by different policies.

The plain HTTP forward proxy handles one request per connection. Its HTTP decision event sets firewall_rule from the earlier TCP authorization, while the separate HTTP evaluation returns only an allow result and a reason. Forward proxy source · HTTP policy evaluation

Impact / Why This Matters

An operator can audit a successful request under the wrong policy key. A detector that groups requests by policy can count the request against the wrong rule. The planned Close and Traffic events report connection-wide measurements, which consumers need to distinguish from request attribution. See #5919 and #5921.

Acceptance Criteria

  • When multiple entries allow the TCP connection and one permits the inspected HTTP request, the HTTP Activity record identifies the entry that permitted the request. Cover a single request on a fresh connection.
  • Where inspected connections support reuse, requests governed by different policy keys have the correct attribution in their own HTTP Activity records.
  • If no request rule matches, or the evaluator has no single deciding rule, the event represents that outcome explicitly. It does not present a TCP policy key as a request match.
  • Connection records retain their connection-level meaning. The fix preserves request allow and deny behavior.

Reproduction Steps

  1. Configure two OpenShell network policies for the same host and port. Give them distinct inspected HTTP rules, such as a read rule for GET and a write rule for PUT.
  2. Enable OCSF JSON output and create an OpenShell sandbox with the policy.
  3. Use a fresh proxied TCP connection to send one HTTP request that only the policy entry other than the recorded TCP match permits.
  4. Compare the resulting OCSF HTTP Activity record's firewall_rule with the policy entry that permits the request.

Environment

  • OpenShell: source inspected on main at 2ac724f0e48c9ef3563cace83978f22e4f10fb42.
  • Relevant path: supervisor plain HTTP forward proxy with HTTP inspection enabled.
  • The steps describe the reported case. This filing used source inspection and did not rerun the deployment.
主要言語
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 を短くまとめたダイジェスト。