$ oc netobserv version
Use the Network Observability CLI to capture and view plain text content from OpenSSL-encrypted network packets. This CLI-only feature uses eBPF probes to intercept and display unencrypted data without requiring TLS certificates or Operator configuration.
The Network Observability CLI packet capture feature can intercept and display the unencrypted content of OpenSSL-encrypted network traffic.
This feature helps you debug encrypted connections when you need to inspect payload data that would otherwise be unreadable.
The CLI uses eBPF probes to intercept OpenSSL library functions before encryption and after decryption, capturing the plain text content without requiring TLS certificates or keys.
This is a CLI-only feature that requires no Operator or agent configuration.
This capability is particularly valuable for the following tasks:
Debugging application-level protocol issues in OpenSSL-encrypted traffic.
Verifying API request and response payloads between services.
Analyzing encrypted traffic content without disabling TLS.
Troubleshooting encrypted connections where you lack access to certificates.
|
Plain text capture currently supports OpenSSL encrypted traffic only. The feature works with the |
When you enable plain text capture during packet capture, the following actions occur:
The CLI attaches eBPF probes to OpenSSL library functions in the target process.
The probes intercept data before encryption (for outgoing traffic) and after decryption (for incoming traffic).
Plain text content is captured and displayed alongside standard packet information.
You can filter captures by pod IP, port, or other criteria to focus on specific traffic.
When using plain text capture, consider the following conditions:
The CLI requires sufficient permissions to attach eBPF probes to running processes. You must have cluster-admin privileges or equivalent access.
The feature captures plain text from applications that use dynamically linked OpenSSL or libssl only. Applications that use static OpenSSL or other TLS libraries are not supported.
Plain text capture works with oc netobserv packets for packet-level data, not with oc netobserv flows for flow-level aggregation.
eBPF probes have minimal performance impact, but capturing large volumes of plain text data can consume additional resources. Use filters to limit capture scope in production environments.
Captured plain text data can contain sensitive information such as passwords, API keys, or personal data. Ensure appropriate access controls and retention policies are in place.
Verify that your environment meets the requirements for capturing plain text from OpenSSL-encrypted network traffic.
The OpenShift CLI (oc) is installed.
The Network Observability CLI (oc netobserv) plugin is installed.
You have cluster-admin privileges or equivalent access to run privileged operations.
Verify the Network Observability CLI plugin is installed by running the following command:
$ oc netobserv version
NetObserv CLI version 1.12.0
Identify the target application for packet capture by running the following command:
$ oc get pods -n <namespace>
Replace <namespace> with the name of the namespace where your pods are deployed.
Note the pod name and namespace of the application that uses OpenSSL for TLS encryption.
Get the pod IP address by running the following command:
$ oc get pod <pod_name> -n <namespace> -o jsonpath='{.status.podIP}'
Identify the port the application listens on by running the following command:
$ oc get pod <pod_name> -n <namespace> -o jsonpath='{.spec.containers[*].ports[*].containerPort}'
Verify that you have the information needed for packet capture by using the following examples:
Pod IP address, such as 10.131.0.15
Port number, such as 8443
Pod uses OpenSSL for TLS encryption
You can now proceed to capture packets with OpenSSL plain text.
Capture network packets and view the unencrypted plain text content from OpenSSL-encrypted connections by using the Network Observability CLI.
The OpenShift CLI (oc) is installed.
The Network Observability CLI (oc netobserv) plugin is installed.
You have cluster-admin privileges.
You have identified the pod IP address and port of the target application that uses OpenSSL.
|
Plain text packet capture reveals unencrypted content from TLS connections, which can contain sensitive information such as passwords, API keys, or personal data. Ensure that appropriate access controls and retention policies are in place. Delete capture files securely when no longer needed. |
Start a packet capture with OpenSSL plain text enabled, filtering by the target pod IP and port:
$ oc netobserv packets --peer_ip=<pod_ip> --port=<pod_port> --enable_openssl
Replace <pod_ip> with the pod IP address and <pod_port> with the port number.
$ oc netobserv packets --peer_ip=10.131.0.15 --port=8443 --enable_openssl
The CLI displays a live table of captured packets with plain text data from OpenSSL-encrypted connections.
Pause the capture by pressing Ctrl+Space.
Navigate the packet capture output:
Use the arrow keys (↑ ↓) to select a packet.
When the capture is paused, the selected packet’s payload is displayed in the detail panel.
Press Tab to cycle focus between the filter input, packet table, and detail panel.
Press Esc to resume the capture.
You can also use the mouse to select packets and move focus between panels.
Optional: Apply additional filters to narrow the capture scope:
$ oc netobserv packets --peer_ip=<pod_ip> --port=<pod_port> --query='SrcK8S_Namespace="<namespace>" or DstK8S_Namespace="<namespace>"' --protocol=TCP --enable_openssl
You can combine filters such as --protocol, --query, or other options to focus on specific traffic. Use --query to filter by namespace, as --namespace changes where the CLI components are deployed.
Optional: Capture packets to a file for later analysis:
$ oc netobserv packets --peer_ip=<pod_ip> --port=<pod_port> --enable_openssl --copy
The CLI writes captured packet data, including plain text content, to the ./output/pcap directory.
Stop the packet capture:
Press Ctrl+C to stop capturing packets and return to the shell prompt.
If you captured packets to a file, verify the output:
$ ls ./output/pcap/
The directory contains timestamped .pcapng capture files. Open a capture file with Wireshark for packet-level analysis.
Verify the captured plain text:
$ ls ./output/plaintext/
The directory contains timestamped .jsonl files with decoded plain text records.
Examine a plain text capture:
$ less ./output/plaintext/<timestamp>.jsonl