jbonofre opened a new issue, #1499:
URL: https://github.com/apache/arrow-java/issues/1499

   ### Describe the bug
   
   In `ArrowFlightSqlClientHandler.Builder.build()`, the TLS trust source is 
selected in the order `tlsRootCerts`, `useSystemTrustStore`, `trustStore`.
   
   Because `useSystemTrustStore` defaults to `true`, configuring a connection 
with `trustStore` and `trustStorePassword` without explicitly setting 
`useSystemTrustStore=false` causes `trustStore` to be silently ignored. 
Instead, the driver loads the system trust store using `trustStorePassword`:
   - On Windows (where the system trust stores ignore the password), or on 
Linux/macOS when the password matches `cacerts` (e.g., `changeit`) or is 
`null`, the server is validated against the system CA store rather than the 
configured `trustStore`.
   - Otherwise, opening `cacerts` fails with `"Keystore was tampered with, or 
password was incorrect"`.
   
   ### Expected behavior
   
   An explicitly configured `trustStore` should take precedence over the 
default `useSystemTrustStore`, matching the existing precedence of 
`tlsRootCerts`, and the Flight SQL JDBC driver documentation should clarify 
that `useSystemTrustStore` is ignored when `trustStore` or `tlsRootCerts` is 
set.


-- 
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]

Reply via email to