-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TLS Configuration Support for QueryServer and Dispatch Client #13645
Conversation
pinot-query-runtime/src/main/java/org/apache/pinot/query/service/server/QueryServer.java
Outdated
Show resolved
Hide resolved
pinot-query-runtime/src/main/java/org/apache/pinot/query/service/server/QueryServer.java
Outdated
Show resolved
Hide resolved
pinot-query-runtime/src/main/java/org/apache/pinot/query/service/server/QueryServer.java
Outdated
Show resolved
Hide resolved
@Jackie-Jiang @xiangfu0 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #13645 +/- ##
============================================
- Coverage 61.75% 57.91% -3.84%
- Complexity 207 219 +12
============================================
Files 2436 2613 +177
Lines 133233 143283 +10050
Branches 20636 21998 +1362
============================================
+ Hits 82274 82987 +713
- Misses 44911 53804 +8893
- Partials 6048 6492 +444
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/channel/GrpcMailboxServer.java
Outdated
Show resolved
Hide resolved
pinot-query-runtime/src/main/java/org/apache/pinot/query/service/dispatch/DispatchClient.java
Outdated
Show resolved
Hide resolved
pinot-query-runtime/src/main/java/org/apache/pinot/query/service/server/QueryServer.java
Outdated
Show resolved
Hide resolved
pinot-query-runtime/src/main/java/org/apache/pinot/query/service/dispatch/DispatchClient.java
Outdated
Show resolved
Hide resolved
8f4cfd0
to
336baa8
Compare
336baa8
to
d771f61
Compare
this(host, port, new GrpcConfig(Collections.emptyMap())); | ||
} | ||
|
||
public DispatchClient(String host, int port, GrpcConfig grpcConfig) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This constructor is only used in the other constructor to create non-tls DispatchClient. Does it mean that if gRPC TLS is enabled on the server side, then DispatchClient will always fail? I don't see a place where TLS enabled DispatchClient is created. cc: @gortiz @Jackie-Jiang
@@ -55,16 +58,18 @@ public class QueryServer extends PinotQueryWorkerGrpc.PinotQueryWorkerImplBase { | |||
|
|||
private final int _port; | |||
private final QueryRunner _queryRunner; | |||
private final TlsConfig _tlsConfig; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nullable annotation is needed here
// query submission service is only used for plan submission for now. | ||
// TODO: with complex query submission logic we should allow asynchronous query submission return instead of | ||
// directly return from submission response observer. | ||
private final ExecutorService _querySubmissionExecutorService; | ||
|
||
private Server _server = null; | ||
|
||
public QueryServer(int port, QueryRunner queryRunner) { | ||
public QueryServer(int port, QueryRunner queryRunner, TlsConfig tlsConfig) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nullabe annotation is needed here
This PR is buggy. It looks like QueryServer enables TLS when it is enabled in netty config but query dispatcher is never using TLS, so multi-stage query engine ends up not working at all if TLS is enabled in netty. |
@gortiz Can you help me with the changes expected ? When I had made the changes didn't had the dev env to test. |
Let me know if you want me to revert this for now and maybe we discuss if major changes are required ? |
TLS support for the QueryServer and Dispatch client in Apache Pinot. The changes include:
TLS Configuration for QueryServer:
Addition of TLS settings to enable secure communication for the QueryServer.
Implementation of SSL context building to manage certificates and keys.
Dispatch Client Updates:
Integration of TLS support for the Dispatch client to ensure secure data dispatch.
These enhancements aim to improve the security of inter-service communication within Apache Pinot, aligning with modern security standards.