-
Notifications
You must be signed in to change notification settings - Fork 49
NETOBSERV-1704 Add kTLS tracker #814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
[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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Oh, I didn't know/remember @msherif1234 had done a PoC In your PoC, what's does mean the "verdict" output that you get ? |
Thanks for sharing, I'll take a look 👀
The verdict is just a status telling if the message PASS or DROP. https://docs.ebpf.io/linux/program-type/BPF_PROG_TYPE_SK_MSG/
I'm going to give a try on a real cluster 😸 |
New images: These will expire after two weeks. To deploy this build, run from the operator repo, assuming the operator is running: USER=netobserv VERSION=51dc3ce make set-agent-image |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #814 +/- ##
==========================================
- Coverage 29.74% 29.45% -0.30%
==========================================
Files 49 49
Lines 5355 5408 +53
==========================================
Hits 1593 1593
- Misses 3645 3698 +53
Partials 117 117
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
} | ||
|
||
int verdict = bpf_msg_redirect_hash(msg, &sock_hash, &skk, BPF_F_INGRESS); | ||
int ret = find_update_flow(msg, verdict); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@msherif1234 was the goal of your initial PoC to get the content of msg->data
here ?
I'm trying to see how we could read some parts of the packet payload, especially when the traffic is encrypted 👼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea behind this PoC was triggered by this talk in KubeCon https://youtu.be/-2FykHaqvlg?si=ArqarppDqd33YH15
this approach avoid using userspace probes
https://elixir.bootlin.com/linux/v6.17.1/source/include/uapi/linux/bpf.h#L6553 sk_msg_md has the same layout like tc or tcp hook look like u can collect all L2/L3/L4 headers info from there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the key thing here is this whole approach relies on using kTLS and more advanced openssl libraries if that is a GO I would like to help with project if there is interest, pls lmk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we are looking for user-space approach for SSL/TLS we can do something like https://github.com/gojue/ecapture/tree/master which I can help PoC it in separate PR if there is interest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your feedback @msherif1234
Let's discuss this on the upstream slack 😸
Description
Based on #222 PoC:

Dependencies
n/a
Checklist
If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.