drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5431) Support SSL
Date Fri, 22 Sep 2017 03:47:06 GMT

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

ASF GitHub Bot commented on DRILL-5431:
---------------------------------------

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

    https://github.com/apache/drill/pull/950#discussion_r140333837
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/rpc/user/UserClient.java
---
    @@ -102,19 +115,78 @@
       // these are used for authentication
       private volatile List<String> serverAuthMechanisms = null;
       private volatile boolean authComplete = true;
    +  private SSLConfig sslConfig;
    +  private Channel sslChannel;
    +  private DrillbitEndpoint endpoint;
     
       public UserClient(String clientName, DrillConfig config, boolean supportComplexTypes,
    -      BufferAllocator allocator, EventLoopGroup eventLoopGroup, Executor eventExecutor)
{
    -    super(
    -        UserRpcConfig.getMapping(config, eventExecutor),
    -        allocator.getAsByteBufAllocator(),
    -        eventLoopGroup,
    -        RpcType.HANDSHAKE,
    -        BitToUserHandshake.class,
    -        BitToUserHandshake.PARSER);
    +      BufferAllocator allocator, EventLoopGroup eventLoopGroup, Executor eventExecutor,
    +      DrillbitEndpoint endpoint) throws NonTransientRpcException {
    +    super(UserRpcConfig.getMapping(config, eventExecutor), allocator.getAsByteBufAllocator(),
    +        eventLoopGroup, RpcType.HANDSHAKE, BitToUserHandshake.class, BitToUserHandshake.PARSER);
    +    this.endpoint = endpoint; // save the endpoint; it might be needed by SSL init.
         this.clientName = clientName;
         this.allocator = allocator;
         this.supportComplexTypes = supportComplexTypes;
    +    this.sslChannel = null;
    +    try {
    +      this.sslConfig = new SSLConfigBuilder().config(config).mode(SSLFactory.Mode.CLIENT)
    +          .initializeSSLContext(true).validateKeyStore(false).build();
    +    } catch (DrillException e) {
    +      throw new NonTransientRpcException(e.getMessage());
    --- End diff --
    
    The exception will be thrown if there is any issue with passed parameters for SSL so it
would be better if we change this exception to InvalidConnectionInfoException.


> Support SSL
> -----------
>
>                 Key: DRILL-5431
>                 URL: https://issues.apache.org/jira/browse/DRILL-5431
>             Project: Apache Drill
>          Issue Type: New Feature
>          Components: Client - Java, Client - ODBC
>            Reporter: Sudheesh Katkam
>            Assignee: Sudheesh Katkam
>
> Support SSL between Drillbit and JDBC/ODBC drivers. Drill already supports HTTPS for
web traffic.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message