[ https://issues.apache.org/jira/browse/DRILL-4335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15998546#comment-15998546 ]
ASF GitHub Bot commented on DRILL-4335: --------------------------------------- Github user sudheeshkatkam commented on a diff in the pull request: https://github.com/apache/drill/pull/773#discussion_r114897536 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/rpc/user/UserConnectionConfig.java --- @@ -35,24 +38,42 @@ private final UserServerRequestHandler handler; UserConnectionConfig(BufferAllocator allocator, BootStrapContext context, UserServerRequestHandler handler) - throws DrillbitStartupException { + throws DrillbitStartupException { super(allocator, context); this.handler = handler; - if (context.getConfig().getBoolean(ExecConstants.USER_AUTHENTICATION_ENABLED)) { - if (getAuthProvider().getAllFactoryNames().isEmpty()) { + final DrillConfig config = context.getConfig(); + final AuthenticatorProvider authProvider = getAuthProvider(); + + if (config.getBoolean(ExecConstants.USER_AUTHENTICATION_ENABLED)) { + if (authProvider.getAllFactoryNames().isEmpty()) { throw new DrillbitStartupException("Authentication enabled, but no mechanisms found. Please check " + "authentication configuration."); } authEnabled = true; - logger.info("Configured all user connections to require authentication using: {}", - getAuthProvider().getAllFactoryNames()); + + // Update encryption related parameters. + encryptionContext.setEncryption(config.getBoolean(ExecConstants.USER_ENCRYPTION_SASL_ENABLED)); + final int maxWrappedSize = config.getInt(ExecConstants.USER_ENCRYPTION_SASL_MAX_WRAPPED_SIZE); + + if (maxWrappedSize <= 0 || maxWrappedSize > RpcConstants.MAX_WRAPPED_SIZE) { + throw new DrillbitStartupException("Invalid value configured for user.encryption.sasl.encodesize." + --- End diff -- encodesize -> max_wrapped_size > 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)