[FLINK-39969][runtime] use the same SSL protcol and algorithms in flink#28553
Open
JozsefKuti wants to merge 1 commit into
Open
[FLINK-39969][runtime] use the same SSL protcol and algorithms in flink#28553JozsefKuti wants to merge 1 commit into
JozsefKuti wants to merge 1 commit into
Conversation
… the flink services and all clients
Collaborator
Contributor
|
Hi |
spuru9
suggested changes
Jun 26, 2026
spuru9
left a comment
Contributor
There was a problem hiding this comment.
Can you tak a look at some minor nits.
| /** Common utilities to manage SSL transport settings. */ | ||
| public class SSLUtils { | ||
|
|
||
| private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(SSLUtils.class); |
Contributor
There was a problem hiding this comment.
Suggested change
| private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(SSLUtils.class); | |
| private static final Logger LOG = LoggerFactory.getLogger(SSLUtils.class); |
Keep import alongside others.
| String[] protocols = getEnabledProtocols(config); | ||
| String[] cipherSuites = getEnabledCipherSuites(config); | ||
|
|
||
| if (LOG.isDebugEnabled()) { |
Contributor
There was a problem hiding this comment.
These four near-identical blocks are a lot of noise for diagnostic logging. Consider a tiny private helper like logSslDiag(String scope, String[] protocols, Iterable ciphers).
Also the [SSL-DIAG] bracket-prefix style isn't used elsewhere in Flink loggin
| private final String[] cipherSuites; | ||
|
|
||
| ConfiguringSSLClientSocketFactory( | ||
| javax.net.ssl.SSLSocketFactory sslSocketFactory, |
Contributor
There was a problem hiding this comment.
nit: drop the fully-qualified names (javax.net.ssl.SSLSocket, java.net.Socket, etc.) in favor of import
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.
What is the purpose of the change
Use the same SSL protcol and algorithms configuration properties in all the flink services and all clients with additional debug logs to make ssl setup visible if needed.
In our flink environment we have to support custom
security.ssl.protocolandsecurity.ssl.algorithmsconfiguration, so we had to test through fromTlsv1.2toTlsv1.2,Tlsv1.3till pureTlsv1.3tls protocol setups using default and non-default ciphers sets.In the cases where there was a common set between the configured and the default java ssl.protocol-ssl.algorithms setup, then everything worked fine, there was a tls version and cipher to use between the client and service side.
However when the cases where there was not any common set we faced
org.apache.flink.runtime.blob.Connection - Error wBlobServerhile executing BLOB connection from /0:0:0:0:0:0:0:1:41630.javax.net.ssl.SSLHandshakeException: no cipher suites in commonBrief change log
org.apache.flink.runtime.net.SSLUtilsneeds the following adjustments:SSLUtils#createSSLClientSocketFactory does not sets the enabled protocols and cipherSuites
SSLUtils#createRestNettySSLContext does sets the enabled sslProtocols and ciphers ONLY for the clients and skips it for the services
Verifying this change
org.apache.flink.runtime.net.SSLUtilsTest had been extended with the following test cases - using TDD where the new tests were failing without the code fixes:
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation