Add additional connection options in spark-datasource for ssl(TLS and mTLS)#101
Draft
praveen2450 wants to merge 6 commits intoforcedotcom:mainfrom
Draft
Add additional connection options in spark-datasource for ssl(TLS and mTLS)#101praveen2450 wants to merge 6 commits intoforcedotcom:mainfrom
praveen2450 wants to merge 6 commits intoforcedotcom:mainfrom
Conversation
…er standard modes - Implement three SSL modes: DISABLED, REQUIRED, VERIFY_FULL - Add support for JKS truststore (REQUIRED mode) and PEM certificates (VERIFY_FULL mode) - Add comprehensive unit tests for SSL validation and property handling - Follow PostgreSQL JDBC and MySQL Connector/J patterns for SSL configuration - Support production certificate paths: client.pem, client-key.pem, cacerts.pem
We've completely changed how SSL works in DirectDataCloudConnection. Instead of users having to specify an ssl_mode like "DISABLED" or "REQUIRED", the system now automatically figures out what kind of SSL to use based on what certificate files you provide. Here's how it works now: - Users don't provide any certs? → Uses system truststore SSL (secure by default) - Users Provide truststore or CA cert? → One-sided TLS (server authentication) - Users Provide client certs too? → Two-sided TLS (mutual authentication) - Users Set ssl_disabled=true? → Plaintext connection (for testing only) , this is internal use only Cleaned up the code quite a bit: - Better error messages when certificate files are missing or unreadable - Proper validation that ensures client cert and key are provided together - Added TODOs for future certificate validation improvements
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.
This is a follow up PR for adding the connection options which is defined in PR#89
Why is this PR in draft?
Once #89 and #94 are merged, we can convert the draft in review