jduo commented on code in PR #38461:
URL: https://github.com/apache/arrow/pull/38461#discussion_r1373923037


##########
java/flight/flight-core/src/main/java/org/apache/arrow/flight/FlightServer.java:
##########
@@ -328,6 +360,15 @@ public Builder useTls(final InputStream certChain, final 
InputStream key) {
       return this;
     }
 
+    /**
+     * Enable mTLS on the server.
+     * @param mTlsCACert The CA certificate to use for verifying clients.
+     */
+    public Builder useMTlsClientVerification(final InputStream mTlsCACert) 
throws IOException {
+      this.mTlsCACert = mTlsCACert;

Review Comment:
   Similar comment as above about this potentially leaking a file. Also, now it 
is ambiguous whether the Flight client should close() mTlsCACert (presumably it 
should).



##########
java/flight/flight-core/src/main/java/org/apache/arrow/flight/FlightServer.java:
##########
@@ -328,6 +360,15 @@ public Builder useTls(final InputStream certChain, final 
InputStream key) {
       return this;
     }
 
+    /**
+     * Enable mTLS on the server.
+     * @param mTlsCACert The CA certificate to use for verifying clients.
+     */
+    public Builder useMTlsClientVerification(final InputStream mTlsCACert) 
throws IOException {
+      this.mTlsCACert = mTlsCACert;

Review Comment:
   Similar comment as above about this potentially leaking a file. Also, now it 
is ambiguous whether the Flight client should close() mTlsCACert (presumably it 
should but there should be a comment).



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to