Skip to content

[JDBC] Explicit trustStore is ignored unless useSystemTrustStore=false #1499

Closed

Description

@jbonofre

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.

Activity

  1. added this to the 20.0.0 milestone on Nov 18, 2026
  2. added a commit that references this issue on Nov 19, 2026
  3. added a commit that references this issue on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions