KAFKA-20437: Fix ssl.enabled.protocols dynamic reconfiguration not being applied#22051
Open
kwondh5217 wants to merge 1 commit intoapache:trunkfrom
Open
KAFKA-20437: Fix ssl.enabled.protocols dynamic reconfiguration not being applied#22051kwondh5217 wants to merge 1 commit intoapache:trunkfrom
kwondh5217 wants to merge 1 commit intoapache:trunkfrom
Conversation
…ing applied Signed-off-by: Daeho Kwon <trewq231@naver.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ssl.enabled.protocolsis documented as a per-broker dynamically reconfigurable config, but it was classified inSslConfigs.NON_RECONFIGURABLE_CONFIGS. BecauseSslFactory.createNewSslEngineFactory()onlycopies keys present in
RECONFIGURABLE_CONFIGSintonextConfigs, the new value is silently dropped.DefaultSslEngineFactory.shouldBeRebuilt()then sees no diff and skips rebuilding the engine, leaving theold protocol set active. As a result, operators who restrict
ssl.enabled.protocolsto TLSv1.3 via kafka-configs.sh see the change reflected in broker logs but TLSv1.2 connections continue to succeed.This PR moves
ssl.enabled.protocolsfromNON_RECONFIGURABLE_CONFIGStoRECONFIGURABLE_CONFIGS. With this change,createNewSslEngineFactory()copies the updated value intonextConfigs,shouldBeRebuilt()detects the diff, and a new
SslEngineFactoryis instantiated with the restricted protocol set. A regression test is added toSslFactoryTestthat configures both TLSv1.2 and TLSv1.3, reconfigures to TLSv1.3only, and asserts that a newly created
SSLEngineno longer advertises TLSv1.2.