wesm commented on a change in pull request #8325:
URL: https://github.com/apache/arrow/pull/8325#discussion_r502002471
##########
File path: cpp/src/arrow/flight/client.cc
##########
@@ -845,18 +878,52 @@ class FlightClient::FlightClientImpl {
if (scheme == kSchemeGrpc || scheme == kSchemeGrpcTcp || scheme ==
kSchemeGrpcTls) {
grpc_uri << location.uri_->host() << ":" << location.uri_->port_text();
- if (scheme == "grpc+tls") {
- grpc::SslCredentialsOptions ssl_options;
- if (!options.tls_root_certs.empty()) {
- ssl_options.pem_root_certs = options.tls_root_certs;
- }
- if (!options.cert_chain.empty()) {
- ssl_options.pem_cert_chain = options.cert_chain;
- }
- if (!options.private_key.empty()) {
- ssl_options.pem_private_key = options.private_key;
+ if (scheme == kSchemeGrpcTls) {
+ if (options.disable_server_verification) {
+#if !defined(GRPC_NAMESPACE_FOR_TLS_CREDENTIALS_OPTIONS)
+ return Status::NotImplemented(
+ "Using encryption with server verification is unsupported.");
+#else
+ namespace ge = GRPC_NAMESPACE_FOR_TLS_CREDENTIALS_OPTIONS;
+
+ // A callback to supply to TlsCredentialsOptions that accepts any
server
+ // arguments.
+ struct NoOpTlsAuthorizationCheck
+ : public ge::TlsServerAuthorizationCheckInterface {
+ int Schedule(ge::TlsServerAuthorizationCheckArg* arg) override {
+ arg->set_success(1);
+ arg->set_status(GRPC_STATUS_OK);
+ return 0;
+ }
+ };
+
+ noOpAuthCheck =
std::shared_ptr<ge::TlsServerAuthorizationCheckConfig>(
Review comment:
Use `no_op_auth_check_` (or `noop_auth_check_`, whichever is more
consistent with how we write it elsewhere in the codebase)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]