-
Notifications
You must be signed in to change notification settings - Fork 268
Publish proposal for connect authorization layer #4767
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
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
| ```c | ||
| // CONNECT layer program - handles redirection and basic filtering. | ||
| SEC("cgroup/connect4") | ||
| int redirect_and_basic_filter(struct bpf_sock_addr *ctx) |
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.
bpf_sock_addr is writable for linux INET_CONNECT attach types. In the new attach type they are effectively not. Should the extension reject the verdict of a program at this attach layer that changed the sock_addr context by modifying the source or destiantion IP/port?
| ### Additional Helper Functions | ||
| CONNECT_AUTHORIZATION and AUTH_RECV_ACCEPT attach types provide access to additional network layer properties through specialized helper functions: | ||
|
|
||
| #### `bpf_sock_addr_get_interface_type(ctx)` |
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.
Suggestion: a single helper function that returns a versioned struct that holds all the required information; with the provision new fields can be added for a future version.
Description
Add proposal only for connect authorization proposal.
Testing
N/A
Documentation
Yes
Installation
No.