Skip to content

Add SSL Keystore and Truststore Connection Properties#17

Open
dstonaiev-ibm wants to merge 4 commits into
DataGrip:mainfrom
dstonaiev-ibm:main
Open

Add SSL Keystore and Truststore Connection Properties#17
dstonaiev-ibm wants to merge 4 commits into
DataGrip:mainfrom
dstonaiev-ibm:main

Conversation

@dstonaiev-ibm
Copy link
Copy Markdown

Added New SSL Utility Method

File: driver/src/main/java/jdbc/utils/SSLUtils.java

Added getValidatingSSLContext() method that creates a proper SSL context with:

  • TrustManager for server certificate validation (from truststore)
  • KeyManager for client certificate authentication (from keystore)
  • No system property writes - only reads as fallback

Enhanced Property Definitions

File: driver/src/main/java/jdbc/properties/RedisDriverPropertyInfoHelper.java

Added new connection properties:

  • Truststore Properties (for server certificate validation):

    • truststorePath - Path to truststore file
    • truststorePassword - Truststore password
    • truststoreType - Truststore type (default: JKS)
  • Keystore Properties (for client certificate authentication):

    • keystorePath - Path to keystore file
    • keystorePassword - Keystore password
    • keystoreType - Keystore type (default: JKS)

Updated SSL Parameter Handling

File: driver/src/main/java/jdbc/client/impl/RedisJedisURIBase.java

Modified setSSLParameters() to:

  1. Read truststore and keystore properties from connection properties (with system property fallback)
  2. For verifyServerCertificate=false: Create custom SSL context that trusts all certificates
  3. For verifyServerCertificate=true: Create validating SSL context with proper certificate validation
  4. No system property writes - maintains thread safety and isolation

@dstonaiev-ibm
Copy link
Copy Markdown
Author

@gkorland , @tjlee, @chayim , @leo-from-spb , @Veirisa please review PR and provide your feedback

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant