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-4335) Apache Drill should support network encryption
Date Mon, 17 Apr 2017 07:42:44 GMT

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

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

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

    https://github.com/apache/drill/pull/773#discussion_r111652686
  
    --- Diff: exec/rpc/src/main/java/org/apache/drill/exec/rpc/AbstractRemoteConnection.java
---
    @@ -224,4 +237,67 @@ public void close() {
         }
       }
     
    +  /**
    +   * Helps to add all the required security handler's after negotiation for encryption
is completed.
    +   * <p>
    +   *  Handler's that are added are:
    +   *    <li>  SaslDecryptionHandler
    +   *    <li>  LengthFieldBasedFrameDecoder Handler
    +   *    <li>  SaslEncryptionHandler
    +   *    <li>  ChunkCreationHandler
    +   * </p>
    +   * <p>
    +   *  If encryption is enabled ChunkCreationHandler is always added irrespective of chunkMode
enabled or not.
    +   *  This helps to make a generic encryption handler.
    +   * </p>
    +   */
    +  @Override
    +  public void addSecurityHandlers() {
    +
    +    final ChannelPipeline channelPipeline = getChannel().pipeline();
    +    channelPipeline.addFirst("SaslDecryptionHandler", new SaslDecryptionHandler(saslBackend,
getWrappedChunkSize(),
    +      OutOfMemoryHandler.DEFAULT_INSTANCE));
    +
    +    channelPipeline.addFirst("Length-Decoder",
    +      new LengthFieldBasedFrameDecoder(ByteOrder.BIG_ENDIAN, Integer.MAX_VALUE,
    +        RpcConstants.LENGTH_FIELD_OFFSET, RpcConstants.LENGTH_FIELD_LENGTH, RpcConstants.LENGTH_ADJUSTMENT,
    +        RpcConstants.INITIAL_BYTES_TO_STRIP, true));
    +
    +    channelPipeline.addAfter("message-decoder", "SaslEncryptionHandler",
    +      new SaslEncryptionHandler(saslBackend, encryptionContext.getMaxRawWrapSendSize(),
    +        OutOfMemoryHandler.DEFAULT_INSTANCE));
    +
    +    channelPipeline.addAfter("SaslEncryptionHandler", "ChunkCreationHandler",
    +      new ChunkCreationHandler("ChunkCreatorHandler", encryptionContext.getMaxRawWrapSendSize()));
    +  }
    +
    +  public void setEncrypted(boolean encrypted) {
    --- End diff --
    
    Setter's are only exposed to UserToBitConnection. AbstractServerConnection overrides it
and throws UnsupportedException.


> Apache Drill should support network encryption
> ----------------------------------------------
>
>                 Key: DRILL-4335
>                 URL: https://issues.apache.org/jira/browse/DRILL-4335
>             Project: Apache Drill
>          Issue Type: New Feature
>            Reporter: Keys Botzum
>            Assignee: Sorabh Hamirwasia
>              Labels: security
>         Attachments: ApacheDrillEncryptionUsingSASLDesign.pdf
>
>
> This is clearly related to Drill-291 but wanted to make explicit that this needs to include
network level encryption and not just authentication. This is particularly important for the
client connection to Drill which will often be sending passwords in the clear until there
is encryption.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message