feat(kuma-cp) add Gateway TLS termination support #3044
Merged
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.
Summary
Add support for terminating TLS sessions on Gateway listeners. Most of
the eventual TLS configuration is missing, but TLS 1.2 (and greater)
sessions can be terminated with reasonable defaults.
The approach we take in this PR is to add a new generator to build
the filter chain. Since HTTP and HTTPS protocols get different filter
chains, we separate the logic into two protocol-specific builders. HTTPS
listeners get a filter chain for each hostname, but HTTP listeners only
get a single shared filter chain. Unfortunately, this makes the lifetime
of the filter chain builder a little non-obvious.
Currently, both the server certificate and the CA certificate chain
must appear in the TLS secret, but this will change in subsequent PRs
to allow multiple certificates, and separate CA chain secrets.
Full changelog
N/A
Issues resolved
N/A
Documentation
N/A
Testing
Backwards compatibility
backport-to-stable
label if the code is backwards compatible. Otherwise, list breaking changes.