Skip to content

[v13] Wrap diag service listener with multiplexer so it can work behind PROXY enabled loadbalancer/proxy.#40140

Merged
AntonAM merged 1 commit intobranch/v13from
anton/backport-39497-branch/v13
Apr 3, 2024
Merged

[v13] Wrap diag service listener with multiplexer so it can work behind PROXY enabled loadbalancer/proxy.#40140
AntonAM merged 1 commit intobranch/v13from
anton/backport-39497-branch/v13

Conversation

@AntonAM
Copy link
Copy Markdown
Contributor

@AntonAM AntonAM commented Apr 2, 2024

Backport #39497 to branch/v13

Manual backport because of log->logger changes and multiplexer didn't need SuppressUnexpectedPROXYWarning because of old approach to PROXY protocol.

changelog: Allow diagnostic endpoints to be accessed behind a PROXY protocol enabled loadbalancer/proxy.

…XY enabled loadbalancer/proxy. (#39497)

* Wrap diag service listener with multiplexer so it can work behind PROXY enabled loadbalancer/proxy.

It accept simultaneously connections that are prepended with PROXY line or not.
We also don't issue warnings about unspecified PROXY protocol mode for this listener.

* Fix wording.

Co-authored-by: Gus Luxton <gus@goteleport.com>

* Use ExitContext instead of GracefulExitContext

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Close diag multiplexer listener during diagnostic.shutdown event.

* Refactor server.Serve() call

* Move creation of muxListener outside of diagnostic.service event.

* Combine declaration and usage

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

---------

Co-authored-by: Gus Luxton <gus@goteleport.com>
Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from webvictim April 2, 2024 20:16
@AntonAM AntonAM added this pull request to the merge queue Apr 2, 2024
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 2, 2024
@AntonAM AntonAM added this pull request to the merge queue Apr 3, 2024
Merged via the queue into branch/v13 with commit 9f624c9 Apr 3, 2024
@AntonAM AntonAM deleted the anton/backport-39497-branch/v13 branch April 3, 2024 01:06
This was referenced Apr 25, 2024
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.

3 participants