[FLINK-39969] [runtime] Apply configured SSL protocols and algorithms#28532
[FLINK-39969] [runtime] Apply configured SSL protocols and algorithms#28532qiuyanjun888 wants to merge 1 commit into
Conversation
|
This PR is focused on runtime / SSLUtils protocol and algorithm handling. @tweise @1996fanrui @RocMarshal could you please take a look when you have time and advise whether this approach is acceptable for this area and can move forward? |
JozsefKuti
left a comment
There was a problem hiding this comment.
I would also add debug logs for SSL settings (even for PekkoUtils to see the RPC settings), because when error happens we are blind.
I know config is there, but log is 100% - increasing the debug level and we can see where the proper configs are applied... even when we are developing its more imporant to see where we missed to update the jar-s...
| .sslProvider(provider) | ||
| .protocols(sslProtocols) | ||
| .ciphers(ciphers) | ||
| .clientAuth(clientAuth) |
There was a problem hiding this comment.
Move .clientAuth(clientAuth) a few lines before where clientAuth is enabled - since it is set even for service side as well at the moment.
What is the purpose of the change
This pull request fixes FLINK-39969 so configured SSL protocols and cipher suites are consistently applied to Flink REST SSL services and internal SSL client sockets. Previously, REST server Netty SSL contexts skipped configured protocols/ciphers when no trust manager was installed, and
createSSLClientSocketFactoryreturned the raw socket factory without applying Flink's configured SSL protocol and algorithms.Brief change log
SslContextBuilderregardless of whether a trust manager is present.SSLSocketreceives the configured protocols and cipher suites, matching the existing server-side socket factory behavior.Verifying this change
This change added tests and can be verified as follows:
./mvnw -pl flink-runtime -Dtest=SSLUtilsTest#testRestServerAppliesConfiguredProtocolsAndCipherSuites+testSetSSLVersionAndCipherSuitesForSSLClientSocket -DfailIfNoTests=false -DskipITs -Dfast -Drat.skip=true -Dcheckstyle.skip=true -Dspotless.check.skip=true testTests run: 2, Failures: 0, Errors: 0, Skipped: 0../mvnw -pl flink-runtime -Dtest=SSLUtilsTest -DfailIfNoTests=false -DskipITs -Dfast -Drat.skip=true -Dspotless.check.skip=true testTests run: 28, Failures: 0, Errors: 0, Skipped: 0../mvnw -pl flink-runtime -DskipTests -DskipITs -Drat.skip=true spotless:checkBUILD SUCCESS.Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: Hermes Agent (OpenAI GPT-5.5)