Skip to content

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

Merged
AntonAM merged 1 commit intobranch/v14from
anton/backport-39497-branch/v14
Apr 2, 2024
Merged

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

Conversation

@AntonAM
Copy link
Copy Markdown
Contributor

@AntonAM AntonAM commented Apr 2, 2024

Backport #39497 to branch/v14

Manual backport because of log->logger changes.

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
Merged via the queue into branch/v14 with commit 237b707 Apr 2, 2024
@AntonAM AntonAM deleted the anton/backport-39497-branch/v14 branch April 2, 2024 21:12
@fheinecke fheinecke mentioned this pull request Apr 12, 2024
This was referenced Aug 6, 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