Skip to content

Conversation

@Alan-Jowett
Copy link
Member

Description

Add proposal only for connect authorization proposal.

Testing

N/A

Documentation

Yes

Installation

No.

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Alan Jowett added 3 commits October 29, 2025 14:20
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)
Copy link
Collaborator

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)`
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants