feat(ocsf): emit a Close event for proxied sandbox connections
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 18/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- rust
- Bereich
- networking, observability, security
Rechercherichtung
This is a design proposal, not a scoped edit: start with the egress usage monitoring RFC linked in the issue and the OCSF spike pull request to see how Traffic and Close events were prototyped, then find where the supervisor emits existing Network Activity records in the OCSF pipeline. Trace the proxied connection lifecycle for raw TCP and inspected HTTP(S) paths to locate the termination point where elapsed time and per-direction byte counts are still available. Done means one Close event per observed termination, correlated to its connection record, covered by tests against the supported OCSF schema, plus documentation of the measurement boundary — expect design discussion before any patch.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
User Story
I use OpenShell to monitor network usage from agent sandboxes. I need a final accounting record for each proxied connection so I can measure usage from short-lived connections and reconcile completed transfers.
Problem Statement
OpenShell's OCSF Network Activity records show connection decisions, but they do not report final byte counts or duration when an allowed, established connection ends.
Impact / Why This Matters
An operator can see which connections OpenShell allowed but cannot tell how much data each completed connection carried. External analytics need this data to detect unusual use of allowed destinations and account for transfers that finish before the next periodic sample. OpenShell Research dev note
Proposed Design
Emit a Network Activity Close event when the supervisor observes an established proxied connection end. Include a connection identifier, sandbox and destination attribution, elapsed time, and final cumulative byte counts in both directions. Document the measurement boundary so consumers can interpret the counts for inspected and tunneled traffic.
Emit Close by default through the existing OCSF pipeline. Configured output destinations retain their existing requirements. This capability works independently of periodic Traffic reporting.
Acceptance Criteria
- One Close event is generated per observed termination, including a normal close and a supervisor-observed interruption. Denied attempts and failed dials do not produce a Close for an established connection.
- A consumer can correlate Close with the corresponding connection record and read the final per-direction totals and elapsed time, including for short-lived connections.
- Tests cover representative supported proxy paths, including raw TCP and inspected HTTP(S), and validate the structured event against the supported OCSF schema.
- Close events are emitted without a dedicated feature flag. Document coverage and what consumers should expect if the supervisor disappears before it can report a close.
Alternatives Considered
- Infrequent snapshots miss short connections and can leave a final interval uncounted.
- A request-level middleware extension can make decisions about inspected HTTP requests. It does not give operators a final byte count for all supported proxied connections.
Agent Investigation
The egress usage monitoring RFC describes lifecycle accounting. The OCSF spike prototyped Close and Traffic events together.
Checklist
- I've reviewed existing issues and the published docs
- This is a design proposal, not a "please build this" request
- Vorherrschende Sprache
- Rust
- Sterne
- 21.5k
- Forks
- 2.1k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus NVIDIA/OpenShell
-
state:triage-needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
-
state:triage-needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
bug: Ready=False/PodTerminating is treated as a terminal sandbox failureEvtl. vergeben @TaylorMutch hat das vor 9 Tagen übernommen. Offenstate:accepted state:pr-opened
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
state:triage-needed
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
state:triage-needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Alle Issues in NVIDIA/OpenShell
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 2 Tagen
-
autofixer: follow-up
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
tursodatabase/turso#12531 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug help wanted ui
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
userFRM/egui-charts#4292 ·
Maintainer antworten meist innerhalb von 1 Tag
-
CHANGELOG.md out of dateOffenIssue-Bug Need-Review
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 85/100
PowerShell/DSC#1832 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag