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

KREST-7955 421 misdirected request if host does not match SNI #410

Merged
merged 7 commits into from
Sep 11, 2023

Conversation

trnguyencflt
Copy link
Member

This PR adds SniHandler that checks for SNI against the host of the request, if they don't match, response with 421.

This handler is controlled by configuration to turn off/on, default is disabled.
sni.check.enabled

Jira ticket

@trnguyencflt trnguyencflt requested review from a team as code owners September 7, 2023 15:21
Copy link
Member

@AndrewJSchofield AndrewJSchofield left a comment

Choose a reason for hiding this comment

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

lgtm. I like the parameterized tests for mTLS enablement.

Copy link
Member

@msn-tldr msn-tldr left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@msn-tldr msn-tldr left a comment

Choose a reason for hiding this comment

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

@trnguyencflt Thinking more on it, it requires more work to be ready. This new feature should have "config" that acts as a feature-flag to safely roll this out. But agree with the change so far 👍

@trnguyencflt
Copy link
Member Author

trnguyencflt commented Sep 11, 2023

@msn-tldr

This new feature should have "config" that acts as a feature-flag to safely roll this out

This will be done on the subsequent cc-spec change (when http2 enable -> enable sni check) (https://confluentinc.atlassian.net/browse/KREST-11523)

For this PR, it is complete on its own because we have a configuration to switch it on/off.

Copy link
Member

@msn-tldr msn-tldr left a comment

Choose a reason for hiding this comment

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

lgtm

@trnguyencflt trnguyencflt merged commit c721242 into master Sep 11, 2023
4 checks passed
@trnguyencflt trnguyencflt deleted the KREST-7955-http2-421-misdirected-request branch September 11, 2023 16:04
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.

None yet

3 participants