Skip to content

Flight SQL JDBC parses boolean properties case-sensitively, silently disabling TLS for useEncryption=TRUE #1357

Open

Description

@Arawoof06

In the Flight SQL JDBC driver, ArrowFlightConnectionConfigImpl.ArrowFlightConnectionProperty.getBoolean compares the property value with:

return valueFromProperties.equals("1") || valueFromProperties.equals("true");

Only the exact lowercase true (or 1) is treated as true. Values coming from the JDBC URL or Properties are not normalized, so a perfectly reasonable value such as useEncryption=TRUE or useEncryption=True is parsed as false.

useEncryption defaults to true and feeds ArrowFlightSqlClientHandler.Builder.withEncryption(...). When it is parsed as false, the driver connects to the server over plaintext gRPC and performs the authentication handshake (username/password, bearer token, or OAuth credentials) over the unencrypted channel. A user who believes they enabled TLS gets a cleartext connection and credential exposure instead.

Most JDBC drivers parse boolean options case-insensitively, so this is surprising and security-relevant. getBoolean should accept true case-insensitively (still honoring 1).

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions