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

[tls][tickets]: add ability to specify lifetime hint #9556

Merged
merged 1 commit into from Jan 5, 2020

Conversation

tehnerd
Copy link
Contributor

@tehnerd tehnerd commented Jan 3, 2020

This is rework of #9149 (no changes to that one; mostly to workaround my bad merge in 9149)

Description:
allow to specify tls ticket's lifetime hint for pre TLSv1.3 clients. today, by default, this value is equal to 2 hours, which could be suboptimal in some scenarios (e.g. envoy being used as edge l7 proxy to server real user's traffic, where user could be inactive for more than 2h (e.g. sleeping etc)).

Risk Level: LOW
Testing:
new unittests + manual tests (w/ openssl s_client; see "ticket lifetime hint" field):

TLSv1.2 default (no session_timeout param in config):

SSL-Session:
Protocol : TLSv1.2
Cipher : ECDHE-RSA-CHACHA20-POLY1305
Session-ID: B1A9C4D45CF77D90039A136AFD6C0D9DEB7C000D109E1A61681F064E4DE9465D
Session-ID-ctx:
Master-Key: E46750473598D278BDCA28DF3AC4174EAFFC6521AF57D1CB6532934B8EED354D302600966DE5C90E684DA9BE12252CDD
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 7200 (seconds)
TLS session ticket:

TLSv1.2 w/ custom timeout of 2307 seconds

SSL-Session:
Protocol : TLSv1.2
Cipher : ECDHE-RSA-CHACHA20-POLY1305
Session-ID: 8413AAECF8FAEBF7D2148C81C716101BD6315F1A64C735802008DF3CB0C8D8E1
Session-ID-ctx:
Master-Key: C1B7B8238860132434ED61FDABF43093230F4A8A7F0ED0E9CEA78AC198B2F9A90E5FC19238E4D047F1C208D267E05E17
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 2307 (seconds)
TLS session ticket:

TLSv1.3 w/ custom timeout of 2307 (which is ignored by TLSv1.3)

SSL-Session:
Protocol : TLSv1.3
Cipher : TLS_AES_256_GCM_SHA384
Session-ID: 9B13E684C5F8210C1FA4F49F733CEAB85B38D87EF59D63A39B05E11F81BCF1CF
Session-ID-ctx:
Resumption PSK: 2BF43FB996DA64E68877E1FA10D79D62F5AAA0DE33D601E1D6C21CA74CBF5BCA2F1A026E83FB165D31612E3E1F52E7C9
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 172800 (seconds)
TLS session ticket:

Docs Changes:
Release Notes:

Signed-off-by: Nikita V. Shirokov tehnerd@tehnerd.com

For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md

Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
[Optional Fixes #Issue]
[Optional Deprecated:]

Description:
allow to specify tls ticket's lifetime hint for pre TLSv1.3 clients. today, by default, this value is equal to 2 hours, which could be suboptimal in some scenarios (e.g. envoy being used as edge l7 proxy to server real user's traffic, where user could be inactive for more than 2h (e.g. sleeping etc)).

Risk Level: LOW
Testing:
new unittests + manual tests (w/ openssl s_client; see "ticket lifetime hint" field):

TLSv1.2 default (no session_timeout param in  config):

SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-CHACHA20-POLY1305
    Session-ID: B1A9C4D45CF77D90039A136AFD6C0D9DEB7C000D109E1A61681F064E4DE9465D
    Session-ID-ctx:
    Master-Key: E46750473598D278BDCA28DF3AC4174EAFFC6521AF57D1CB6532934B8EED354D302600966DE5C90E684DA9BE12252CDD
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    TLS session ticket lifetime hint: 7200 (seconds)
    TLS session ticket:

TLSv1.2 w/ custom timeout of 2307 seconds

SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-CHACHA20-POLY1305
    Session-ID: 8413AAECF8FAEBF7D2148C81C716101BD6315F1A64C735802008DF3CB0C8D8E1
    Session-ID-ctx:
    Master-Key: C1B7B8238860132434ED61FDABF43093230F4A8A7F0ED0E9CEA78AC198B2F9A90E5FC19238E4D047F1C208D267E05E17
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    TLS session ticket lifetime hint: 2307 (seconds)
    TLS session ticket:

TLSv1.3 w/ custom timeout of 2307 (which is ignored by TLSv1.3)

SSL-Session:
    Protocol  : TLSv1.3
    Cipher    : TLS_AES_256_GCM_SHA384
    Session-ID: 9B13E684C5F8210C1FA4F49F733CEAB85B38D87EF59D63A39B05E11F81BCF1CF
    Session-ID-ctx:
    Resumption PSK: 2BF43FB996DA64E68877E1FA10D79D62F5AAA0DE33D601E1D6C21CA74CBF5BCA2F1A026E83FB165D31612E3E1F52E7C9
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    TLS session ticket lifetime hint: 172800 (seconds)
    TLS session ticket:

Docs Changes:
Release Notes:

Signed-off-by: Nikita V. Shirokov <tehnerd@tehnerd.com>
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.

🐱

Caused by: #9556 was opened by tehnerd.

see: more, trace.

@tehnerd
Copy link
Contributor Author

tehnerd commented Jan 3, 2020

cc: @mattklein123 (sorry for explicit nag; this is rework (proper merge w/ upstream) of #9149 )

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks!

@repokitteh-read-only repokitteh-read-only bot removed the api label Jan 5, 2020
@mattklein123 mattklein123 merged commit d0b1301 into envoyproxy:master Jan 5, 2020
@tehnerd tehnerd deleted the new_tls_tickets branch January 6, 2020 15:51
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.

None yet

2 participants