Skip to content

[MINOR][NETWORK] Use system default trust managers in SSLFactory when truststore is missing - #56089

Closed
RinZ27 wants to merge 1 commit into
apache:masterfrom
RinZ27:fix/secure-default-ssl-validation
Closed

[MINOR][NETWORK] Use system default trust managers in SSLFactory when truststore is missing#56089
RinZ27 wants to merge 1 commit into
apache:masterfrom
RinZ27:fix/secure-default-ssl-validation

Conversation

@RinZ27

@RinZ27 RinZ27 commented May 24, 2026

Copy link
Copy Markdown

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.

@RinZ27 RinZ27 changed the title security(network): replace insecure trust-all fallback with JVM default trust managers [MINOR][NETWORK] Use system default trust managers in SSLFactory when truststore is missing May 24, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!

@RinZ27

RinZ27 commented Sep 2, 2026

Copy link
Copy Markdown
Author

I have updated the branch with the latest master to resolve staleness

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant