RinZ27 opened a new pull request, #58478:
URL: https://github.com/apache/spark/pull/58478

   *(Replacing stale PR #56089 because GitHub blocked reopening it after branch 
updates)*
   
   ### What changes were proposed in this pull request?
   Refactored `SSLFactory.java` to replace the insecure 
`credulousTrustStoreManagers` fallback with the JVM's default 
`TrustManagerFactory`. When a truststore is not explicitly provided, the system 
now correctly utilizes the standard system trust managers instead of blindly 
trusting all certificates. 
   
   ### Why are the changes needed?
   The previous implementation defaulted to a "trust-all" behavior if a 
truststore was missing or misconfigured. This silent security failure left 
internal Spark networking (RPC, Shuffle) vulnerable to Man-in-the-Middle (MITM) 
attacks. Aligning with standard Java security practices ensures robust 
certificate validation is maintained by default. 
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   Added a new unit test case `testBuildWithoutTrustStoreUsesSystemDefault` in 
`SSLFactorySuite.java` to verify successful engine initialization without a 
specific truststore. Verified all existing tests in `SSLFactorySuite` pass as 
expected. 
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to