Fix PROXY protocol handling of dedicated kube listener with TLS routing#34317
Merged
Fix PROXY protocol handling of dedicated kube listener with TLS routing#34317
Conversation
Contributor
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
Contributor
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
avatus
approved these changes
Nov 10, 2023
Contributor
|
@AntonAM can you please include tests that cover this scenario? |
Contributor
Author
|
@tigrato I've adjusted existing tests, so it checks both addresses when in multiplexed mode (it would catch the original problem) |
tigrato
approved these changes
Nov 15, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In multiplexed mode alpn proxy passes connection to the Kube listener directly. If PROXY protocol mode is "on" Kube listener in that case would not get PROXY line that was already handled by the alpn listener and fail. In #32893 we made Kube listener to always have PROXY protocol mode "off" in multiplexed proxy listening mode, but that lead to a problem that now users couldn't use dedicated Kube listener directly, since PROXY line was rejected.
This PR changes how we handle it - now we don't switch off PROXY protocol mode for the Kube listener in multiplexed mode, instead in the multiplexer listener we check if accepted connection is itself multiplexer connection (or wrapped at some level) - that means it's coming from alpn proxy and PROXY protocol line requirement was already handled, so we don't check it second time.
Changelog: Fix accessing dedicated Proxy Kube port when TLS routing is enabled.
Closes #34178