Skip to content

Fix PROXY protocol handling of dedicated kube listener with TLS routing#34317

Merged
AntonAM merged 2 commits intomasterfrom
anton/fix-proxy-protocol-kube-listener
Nov 15, 2023
Merged

Fix PROXY protocol handling of dedicated kube listener with TLS routing#34317
AntonAM merged 2 commits intomasterfrom
anton/fix-proxy-protocol-kube-listener

Conversation

@AntonAM
Copy link
Copy Markdown
Contributor

@AntonAM AntonAM commented Nov 7, 2023

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 7, 2023

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 changelog: followed by the changelog entries for the PR.

@github-actions github-actions Bot requested review from avatus and gzdunek November 7, 2023 21:04
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 7, 2023

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 changelog: followed by the changelog entries for the PR.

@AntonAM
Copy link
Copy Markdown
Contributor Author

AntonAM commented Nov 10, 2023

Friendly ping to reviewers ( @avatus @gzdunek @tigrato @dboslee )

@tigrato
Copy link
Copy Markdown
Contributor

tigrato commented Nov 12, 2023

@AntonAM can you please include tests that cover this scenario?
thanks in advance

@AntonAM
Copy link
Copy Markdown
Contributor Author

AntonAM commented Nov 14, 2023

@tigrato I've adjusted existing tests, so it checks both addresses when in multiplexed mode (it would catch the original problem)

@AntonAM AntonAM added this pull request to the merge queue Nov 15, 2023
Merged via the queue into master with commit c979952 Nov 15, 2023
@AntonAM AntonAM deleted the anton/fix-proxy-protocol-kube-listener branch November 15, 2023 20:56
@public-teleport-github-review-bot
Copy link
Copy Markdown

@AntonAM See the table below for backport results.

Branch Result
branch/v14 Failed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to use dedicated kube port when tls routing is enabled

4 participants