Skip to content

Conversation

sayboras
Copy link
Member

This commit is to support domain matching logic for SNI.

Examples of valid matches:

"*.example.com" matches:

  • "foo.example.com"
  • "bar.example.com"
  • "sub.example.com"
    but not:
  • "example.com" as wildcard requires exactly one label
  • "foo.bar.example.com" due to too many labels
  • "notexample.com" due to different domain

@sayboras sayboras force-pushed the pr/tammach/sni-hacking branch 4 times, most recently from b7e63c3 to 8e14edb Compare March 30, 2025 08:04
@sayboras sayboras marked this pull request as ready for review March 30, 2025 08:07
@sayboras sayboras requested a review from a team as a code owner March 30, 2025 08:07
@sayboras sayboras requested a review from jrajahalme March 30, 2025 08:07
@sayboras sayboras changed the title sni: Add logic to allow pattern match sni: Add logic to allow pattern prefix match Mar 31, 2025
@sayboras sayboras force-pushed the pr/tammach/sni-hacking branch from 8e14edb to 4bdbc38 Compare March 31, 2025 05:32
Copy link
Member

@jrajahalme jrajahalme left a comment

Choose a reason for hiding this comment

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

We should remove the partial subdomain match, it is dangerous.

This commit is to support domain matching logic for SNI.

Examples of valid matches:

"*.example.com" matches:
  - "foo.example.com"
  - "bar.example.com"
  - "sub.example.com"

but not:
  - "example.com" as wildcard requires exactly one label
  - "foo.bar.example.com" due to too many labels
  - "notexample.com" due to different domain

Signed-off-by: Tam Mach <tam.mach@cilium.io>
@sayboras sayboras force-pushed the pr/tammach/sni-hacking branch from 4bdbc38 to ce4b1c6 Compare March 31, 2025 12:29
@sayboras sayboras requested a review from jrajahalme March 31, 2025 12:30
Copy link
Member

@jrajahalme jrajahalme left a comment

Choose a reason for hiding this comment

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

Good work, thank you :-)

@jrajahalme jrajahalme added this pull request to the merge queue Apr 1, 2025
Merged via the queue into main with commit f38edd1 Apr 1, 2025
5 checks passed
@jrajahalme jrajahalme deleted the pr/tammach/sni-hacking branch April 1, 2025 12:44
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.

2 participants