Skip to content
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

tls_wrapper: Use raw socket with non-TLS policy #1004

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

jrajahalme
Copy link
Member

@jrajahalme jrajahalme commented Nov 9, 2024

Cilium tls_wrapper should allow raw socket to be used if policy allows without TLS context.

Also check for SNI when getting TLS context so that the one matching the SNI is used if multiple are available.

Add policy tests validating the policy functionality.

Fixes: #890

@jrajahalme jrajahalme added the bug Something isn't working label Nov 9, 2024
@jrajahalme jrajahalme requested a review from a team as a code owner November 9, 2024 13:20
@jrajahalme jrajahalme requested review from sayboras and removed request for a team November 9, 2024 13:20
@jrajahalme jrajahalme force-pushed the tls-wrapper-use-raw-with-non-tls-policy branch 3 times, most recently from 4b6cc0d to 2190d8b Compare November 9, 2024 15:48
@jrajahalme jrajahalme marked this pull request as draft November 9, 2024 15:51
@jrajahalme jrajahalme force-pushed the tls-wrapper-use-raw-with-non-tls-policy branch 2 times, most recently from 82b5f8b to b9e6066 Compare November 9, 2024 18:00
@jrajahalme jrajahalme marked this pull request as ready for review November 9, 2024 18:00
Cilium tls_wrapper should allow raw socket to be used if policy allows
without TLS context.

Also check for SNI when getting TLS context so that the one matching the
SNI is used if multiple are available.

Add policy tests validating the policy functionality.

Signed-off-by: Jarno Rajahalme <[email protected]>
@jrajahalme jrajahalme force-pushed the tls-wrapper-use-raw-with-non-tls-policy branch from b9e6066 to 56316c0 Compare November 9, 2024 18:04
@jrajahalme
Copy link
Member Author

Testing at cilium/cilium#35887

Copy link
Member

@sayboras sayboras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice coverage ✔️

@sayboras sayboras added this pull request to the merge queue Nov 12, 2024
Merged via the queue into main with commit c35cf76 Nov 12, 2024
5 checks passed
@sayboras sayboras deleted the tls-wrapper-use-raw-with-non-tls-policy branch November 12, 2024 06:45
@sayboras sayboras mentioned this pull request Nov 12, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-done/1.29 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants