Skip to content

[LI-CHERRY-PICK] KAFKA-13418: Support key updates with TLS 1.3 (#11966)#485

Merged
lmr3796 merged 3 commits into
3.0-lifrom
tlin-patch1
Oct 31, 2023
Merged

[LI-CHERRY-PICK] KAFKA-13418: Support key updates with TLS 1.3 (#11966)#485
lmr3796 merged 3 commits into
3.0-lifrom
tlin-patch1

Conversation

@lmr3796

@lmr3796 lmr3796 commented Oct 30, 2023

Copy link
Copy Markdown

LI_DESCRIPTION=This may improve p99 inter-broker latency under TLS1.3

-- Original message --

Key updates with TLS 1.3 trigger code paths similar to renegotiation with TLS 1.2. Update the read/write paths not to throw an exception in this case (kept the exception in the handshake method).

With the default configuration, key updates happen after 2^37 bytes are encrypted. There is a security property to adjust this configuration, but the change has to be done before it is used for the first time and it cannot be changed after that. As such, it is best done via a system test (filed KAFKA-13779).

To validate the change, I wrote a unit test that forces key updates and manually ran a producer workload that produced more than 2^37 bytes. Both cases failed without these changes and pass with them.

Note that Shylaja Kokoori attached a patch with the SslTransportLayer fix and hence included them as a co-author of this change.

Reviewers: Rajini Sivaram rajinisivaram@googlemail.com

Co-authored-by: Shylaja Kokoori

…e#11966)

LI_DESCRIPTION=This may improve p99 inter-broker latency under TLS1.3

-- Original message --

Key updates with TLS 1.3 trigger code paths similar to renegotiation with TLS 1.2.
Update the read/write paths not to throw an exception in this case (kept the exception
in the `handshake` method).

With the default configuration, key updates happen after 2^37 bytes are encrypted.
There is a security property to adjust this configuration, but the change has to be
done before it is used for the first time and it cannot be changed after that. As such,
it is best done via a system test (filed KAFKA-13779).

To validate the change, I wrote a unit test that forces key updates and manually ran
a producer workload that produced more than 2^37 bytes. Both cases failed without
these changes and pass with them.

Note that Shylaja Kokoori attached a patch with the SslTransportLayer fix and hence
included them as a co-author of this change.

Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>

Co-authored-by: Shylaja Kokoori
@lmr3796 lmr3796 changed the title [LI-CHERRY_PICK] KAFKA-13418: Support key updates with TLS 1.3 (#11966) [LI-CHERRY-PICK] KAFKA-13418: Support key updates with TLS 1.3 (#11966) Oct 30, 2023

@groelofs groelofs left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

One perf(?) nit, otherwise seems fine...though I'm definitely not a TLS/SSL expert.

@lmr3796 lmr3796 merged commit bd6e481 into 3.0-li Oct 31, 2023
@lmr3796 lmr3796 deleted the tlin-patch1 branch October 31, 2023 18:32
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.

3 participants