Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(translator): client tls session resumption #4293

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

guydc
Copy link
Contributor

@guydc guydc commented Sep 20, 2024

What type of PR is this?

What this PR does / why we need it:

Introduces an API for TLS session management:

  • Session Timeout
  • Disable TLS resumption by default. Allow users to opt-in.
  • Adds E2E Tests and Docs for ClientTrafficPolicy TLS settings

Which issue(s) this PR fixes:
Fixes #4268, #2422, #2421

@guydc guydc requested a review from a team as a code owner September 20, 2024 19:04
Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 65.80%. Comparing base (0f4cb27) to head (d24d5c0).

Files with missing lines Patch % Lines
internal/gatewayapi/clienttrafficpolicy.go 80.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4293      +/-   ##
==========================================
+ Coverage   65.72%   65.80%   +0.08%     
==========================================
  Files         200      200              
  Lines       24125    24145      +20     
==========================================
+ Hits        15856    15889      +33     
+ Misses       7135     7124      -11     
+ Partials     1134     1132       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@guydc
Copy link
Contributor Author

guydc commented Sep 25, 2024

Following yesterday's community meeting, some additional industry context.

Currently, Mozilla's SSL config generator recommends disabling stateless resumption (session tickets) for nginx, apache and haproxy for security reasons.

This is mostly due to insufficient rotation of session ticket encryption keys in these projects. There is an ongoing discussion on changing the recommendation for newer versions of nginx where keys are rotated: mozilla/server-side-tls#135.

BoringSSL rotates encryption keys by default every 48 hours: https://commondatastorage.googleapis.com/chromium-boringssl-docs/ssl.h.html#Session-tickets. Envoy doesn't change this behavior or make the rotation schedule configurable. Industry leaders like cloudflare rotate session ticket encryption keys every hour: https://blog.cloudflare.com/keyless-ssl-the-nitty-gritty-technical-details/.

There is no security recommendation to disable stateful session resumption. However:

nginx ingress by default disables stateful and stateless session resumption, but makes it possible to opt-in:

I propose that we change the current behavior and disable both resumption methods by default, but allow users to opt-in similar to nginx ingress.

@guydc guydc changed the title api: client tls session resumption feat(translator): client tls session resumption Oct 7, 2024
Signed-off-by: Guy Daich <[email protected]>
Signed-off-by: Guy Daich <[email protected]>
@@ -69,3 +79,56 @@ spec:
- kind: "Secret"
group: ""
name: "client-mtls-certificate"
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to record how this is generated for future maintenance.

// of different resumption methods. Performance gains from resumption are diminished when
// Envoy proxy is deployed with more than one replica.
// +optional
SessionResumptionSettings *SessionResumptionSettings `json:"sessionResumption,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer SessionResumption

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support TLS Session Resumption settings
4 participants