[ 
https://issues.apache.org/jira/browse/CALCITE-2285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16510278#comment-16510278
 ] 

ASF GitHub Bot commented on CALCITE-2285:
-----------------------------------------

Github user joshelser commented on a diff in the pull request:

    https://github.com/apache/calcite-avatica/pull/57#discussion_r194901281
  
    --- Diff: 
core/src/main/java/org/apache/calcite/avatica/remote/AvaticaCommonsHttpClientImpl.java
 ---
    @@ -127,11 +121,54 @@ private void initializeClient() {
         final String maxCnxnsPerRoute = 
System.getProperty(MAX_POOLED_CONNECTION_PER_ROUTE_KEY,
             MAX_POOLED_CONNECTION_PER_ROUTE_DEFAULT);
         pool.setDefaultMaxPerRoute(Integer.parseInt(maxCnxnsPerRoute));
    +  }
     
    -    this.authCache = new BasicAuthCache();
    +  protected Registry<ConnectionSocketFactory> configureSocketFactories() {
    +    RegistryBuilder<ConnectionSocketFactory> registryBuilder = 
RegistryBuilder.create();
    +    configureHttpRegistry(registryBuilder);
    +    configureHttpsRegistry(registryBuilder);
    +    return registryBuilder.build();
    +  }
     
    -    // A single thread-safe HttpClient, pooling connections via the 
ConnectionManager
    -    this.client = HttpClients.custom().setConnectionManager(pool).build();
    +  protected void 
configureHttpsRegistry(RegistryBuilder<ConnectionSocketFactory> 
registryBuilder) {
    +    if (!configureHttpsSocket) {
    --- End diff --
    
    I think there's a strong coupling of HttpClient to a specific avatica 
server instance ( going off of memory). If that's the case, then there's no 
problem in making the determination as to what kind of http client we need to 
set up.


> Support client cert keystore for Avatica Client
> -----------------------------------------------
>
>                 Key: CALCITE-2285
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2285
>             Project: Calcite
>          Issue Type: Improvement
>          Components: avatica
>            Reporter: Karan Mehta
>            Assignee: Karan Mehta
>            Priority: Major
>             Fix For: avatica-1.12.0
>
>
> Currently Avatica only supports adding trust-store in {{SSLContext}} in all 
> {{AvaticaHttpClient}} implementations. If keystore support it added, MTLS 
> connections can be established as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to