Skip to content

GH-40097: [Go][FlightRPC] Enable disabling TLS#40098

Merged
zeroshade merged 2 commits intoapache:mainfrom
waynr:flightsql/enable-disabling-tls
Feb 20, 2024
Merged

GH-40097: [Go][FlightRPC] Enable disabling TLS#40098
zeroshade merged 2 commits intoapache:mainfrom
waynr:flightsql/enable-disabling-tls

Conversation

@waynr
Copy link
Copy Markdown
Contributor

@waynr waynr commented Feb 15, 2024

See #40097 for more in-depth description
about the problem that led me to file this PR.

Rationale for this change

Because it's annoying to not be able to connect to a non-TLS flightsql endpoint
in my development environment just because my development environment happens
to still use token authentication.

What changes are included in this PR?

Thread the flightsql DriverConfig.TLSEnabled parameter into the
grpcCredentials type so that grpcCredentials.RequireTransportSecurity can
return false if TLS is not enabled on the driver config.

One thing that occurred to me about the DriverConfig.TLSEnabled field is that
its semantics seem very mildly dangerous since golang bool types are false
by default and golang doesn't require fields on structs to be explicitly
initialized. It seems to me that DriverConfig.TLSDisabled would be better (semantically speaking)
because then the API user doesn't have to explicitly enable TLS. But I suppose
it's probably undesirable to change the name of a public field on a public type.

Are these changes tested?

I haven't written any tests, mostly because there weren't already any tests for
the grpcCredentials type but I have manually verified this fixes the problem
I described in #40097 by rebuilding my
tool and running it against the non-TLS listening thing in my development
environment.

Are there any user-facing changes?

@waynr waynr requested a review from zeroshade as a code owner February 15, 2024 23:04
@github-actions
Copy link
Copy Markdown

⚠️ GitHub issue #40097 has been automatically assigned in GitHub to PR creator.

@kou kou changed the title GH-40097: [Go][FlightRPC] enable disabling tls GH-40097: [Go][FlightRPC] Enable disabling TLS Feb 16, 2024
Copy link
Copy Markdown
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks @waynr!

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Feb 19, 2024
Copy link
Copy Markdown
Member

@zeroshade zeroshade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting committer review Awaiting committer review labels Feb 20, 2024
@zeroshade zeroshade merged commit a690088 into apache:main Feb 20, 2024
@zeroshade zeroshade removed the awaiting merge Awaiting merge label Feb 20, 2024
@conbench-apache-arrow
Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit a690088.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Go][FlightRPC] flightsql gRPC driver does not respect flightsql's DriverConfig.TLSEnabled field

4 participants