You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/05/08 19:59:06 UTC
[GitHub] [arrow] erinleeryan opened a new pull request #7130: [C++][Python] Add GRPC Mutual TLS for clients and server
erinleeryan opened a new pull request #7130:
URL: https://github.com/apache/arrow/pull/7130
Our team would like to implement mutual tls authentication for a pyarrow client, hence modifications to the C++ and Python implementations to at a GrpcMTls scheme for connections.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [arrow] lidavidm commented on a change in pull request #7130: ARROW-8742: [C++][Python] Add GRPC Mutual TLS for clients and server
Posted by GitBox <gi...@apache.org>.
lidavidm commented on a change in pull request #7130:
URL: https://github.com/apache/arrow/pull/7130#discussion_r422696732
##########
File path: cpp/src/arrow/flight/client.cc
##########
@@ -531,14 +531,19 @@ class FlightClient::FlightClientImpl {
std::stringstream grpc_uri;
std::shared_ptr<grpc::ChannelCredentials> creds;
- if (scheme == kSchemeGrpc || scheme == kSchemeGrpcTcp || scheme == kSchemeGrpcTls) {
+ if (scheme == kSchemeGrpc || scheme == kSchemeGrpcTcp || scheme == kSchemeGrpcTls || scheme == kSchemeGrpcMTls) {
grpc_uri << location.uri_->host() << ":" << location.uri_->port_text();
- if (scheme == "grpc+tls") {
+ if ((scheme == "grpc+tls") || (scheme == "grpc+mtls") {
grpc::SslCredentialsOptions ssl_options;
if (!options.tls_root_certs.empty()) {
ssl_options.pem_root_certs = options.tls_root_certs;
}
+ if (scheme == 'grpc+mtls'){
Review comment:
Is a whole new scheme necessary? I'd say that so long as the client has provided a list of client cert/key pairs, then mTLS should just be enabled, no?
##########
File path: cpp/src/arrow/flight/client.cc
##########
@@ -531,14 +531,19 @@ class FlightClient::FlightClientImpl {
std::stringstream grpc_uri;
std::shared_ptr<grpc::ChannelCredentials> creds;
- if (scheme == kSchemeGrpc || scheme == kSchemeGrpcTcp || scheme == kSchemeGrpcTls) {
+ if (scheme == kSchemeGrpc || scheme == kSchemeGrpcTcp || scheme == kSchemeGrpcTls || scheme == kSchemeGrpcMTls) {
grpc_uri << location.uri_->host() << ":" << location.uri_->port_text();
- if (scheme == "grpc+tls") {
+ if ((scheme == "grpc+tls") || (scheme == "grpc+mtls") {
grpc::SslCredentialsOptions ssl_options;
if (!options.tls_root_certs.empty()) {
ssl_options.pem_root_certs = options.tls_root_certs;
}
+ if (scheme == 'grpc+mtls'){
Review comment:
Also, this doesn't build and needs to be formatted - the developer guide has instructions: https://arrow.apache.org/docs/developers/cpp/index.html
##########
File path: cpp/src/arrow/flight/server.cc
##########
@@ -665,16 +665,20 @@ Status FlightServerBase::Init(const FlightServerOptions& options) {
const Location& location = options.location;
const std::string scheme = location.scheme();
- if (scheme == kSchemeGrpc || scheme == kSchemeGrpcTcp || scheme == kSchemeGrpcTls) {
+ if (scheme == kSchemeGrpc || scheme == kSchemeGrpcTcp || scheme == kSchemeGrpcTls || scheme == kSchemeGrpcMTls) {
std::stringstream address;
address << location.uri_->host() << ':' << location.uri_->port_text();
std::shared_ptr<grpc::ServerCredentials> creds;
- if (scheme == kSchemeGrpcTls) {
+ if ((scheme == kSchemeGrpcTls) || (scheme == kSchemeGrpcMTls)) {
grpc::SslServerCredentialsOptions ssl_options;
for (const auto& pair : options.tls_certificates) {
ssl_options.pem_key_cert_pairs.push_back({pair.pem_key, pair.pem_cert});
}
+ if (scheme == kSchemeGrpcMTls) {
Review comment:
I'd say instead of using a new scheme, just add a flag to `FlightServerOptions`.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [arrow] github-actions[bot] commented on pull request #7130: ARROW-8742: [C++][Python] Add GRPC Mutual TLS for clients and server
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7130:
URL: https://github.com/apache/arrow/pull/7130#issuecomment-625999819
https://issues.apache.org/jira/browse/ARROW-8742
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [arrow] github-actions[bot] commented on pull request #7130: [C++][Python] Add GRPC Mutual TLS for clients and server
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7130:
URL: https://github.com/apache/arrow/pull/7130#issuecomment-625993735
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
Thanks for opening a pull request!
Could you open an issue for this pull request on JIRA?
https://issues.apache.org/jira/browse/ARROW
Then could you also rename pull request title in the following format?
ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}
See also:
* [Other pull requests](https://github.com/apache/arrow/pulls/)
* [Contribution Guidelines - How to contribute patches](https://arrow.apache.org/docs/developers/contributing.html#how-to-contribute-patches)
----------------------------------------------------------------
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:
users@infra.apache.org