NETOBSERV 2859 Wire correlation + live TUI - #582
jpinsonneau wants to merge 7 commits into
Conversation
Add --enable_openssl packet capture wiring, PlaintextDisplay formatting (prefix stripping, HTTP peeling), and openssl/http example workloads. Writes output/plaintext/*.jsonl without wire correlation or TUI (NETOBSERV-2859). Use --background during capture; pair with agent image from NETOBSERV-2857. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #582 +/- ##
===========================================
+ Coverage 13.18% 30.04% +16.86%
===========================================
Files 20 25 +5
Lines 2443 3764 +1321
===========================================
+ Hits 322 1131 +809
- Misses 2095 2503 +408
- Partials 26 130 +104
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
87c4b71 to
034b036
Compare
Description
Follow-up to NETOBSERV-2858 (OpenSSL TLS plaintext → JSONL export). This PR (NETOBSERV-2859) adds wire↔plaintext correlation and a live TUI for TLS plaintext during on-demand
netobserv packetscaptures. Everything is gated on--enable_openssl— GoTLS/kTLS are intentionally left out until the eBPF agent side lands.The meaningful review scope is the final commit, "Wire correlation + live TUI"; earlier commits are the already-reviewed 2858 base.
What's new
Correlation engine (
packet_capture_wire_buffer.go) — buffers wire (PCA) packets and pending plaintext events, then matches them by a scored strategy: strict 5-tuple → remote-endpoint → loose-endpoint → capture-filter, with an agent/receive-time correlation window and a TCP-payload-vs-handshake bonus. Ambiguous matches (two candidates within a small margin) are refused rather than guessed. On a match, the wire packet's 5-tuple and FLP Kubernetes fields are overlaid onto the plaintext record.pcap EPB annotations +
PcapAnnotated— when a plaintext event correlates to a real wire frame, its preview is written as an EPB comment on that packet (with the plaintextPacketID), and the exported record'sPcapAnnotatedflips totrue. Uncorrelated events flush withPcapAnnotated=false. Replaces the previous NETOBSERV-2859 no-op stub.Capture filters (
packet_capture_filters.go) —--port/--peer_ip/--peer_cidrare parsed into correlation hints and used both to enrich partial plaintext tuples and to score filter-based matches.Live TUI (
flow_display.go,wire_payload.go,map_format.go,config.yaml) — packet capture with plaintext enabled keeps separate time-sorted wire/plaintext buffers; plaintext rows render green withEvent/Type,Plaintext Dir, andPlaintext Previewcolumns. Selecting a row opens a detail panel showing decoded TLS plaintext (text or hex) or cleartext wire HTTP.Scope note:
plaintextCaptureEnabled()stays OpenSSL-only. The correlation code recognizesgotls/ktlsTLSSourcevalues in its pod-compatibility heuristics (pure Go, no eBPF dependency), but those capture paths are not wired.Dependencies
Builds on the OpenSSL plaintext JSONL export from NETOBSERV-2858 (its commits are included here). No other PRs required.
Checklist
netobserv packets --enable_openssl --privilegedagainst an HTTPS workload using libssl (e.g. theopenssl-test-pod), ideally scoped with--peer_ip/--peer_cidrand--port. Requires a collector image built from this branch (NETOBSERV_COLLECTOR_IMAGE); the default:mainimage does not yet ship this code. Seedocs/tls-decryption-coverage.md.🤖 Generated with Claude Code