drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sudheeshkatkam <...@git.apache.org>
Subject [GitHub] drill pull request #773: DRILL-4335: Apache Drill should support network enc...
Date Fri, 05 May 2017 16:41:37 GMT
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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message