private ACLProvider getACLProvider(HiveConf hiveConf) {
    final boolean isSecure = ZookeeperUtils.isKerberosEnabled(hiveConf);

    return new ACLProvider() {
      @Override
      public List<ACL> getDefaultAcl() {
        List<ACL> nodeAcls = new ArrayList<ACL>();
        if (isSecure) {
          // Read all to the world
          nodeAcls.addAll(Ids.READ_ACL_UNSAFE);
          // Create/Delete/Write/Admin to the authenticated user
          nodeAcls.add(new ACL(Perms.ALL, Ids.AUTH_IDS));
        } else {
          // ACLs for znodes on a non-kerberized cluster
          // Create/Read/Delete/Write/Admin to the world
          nodeAcls.addAll(Ids.OPEN_ACL_UNSAFE);
        }
        return nodeAcls;
      }

      @Override
      public List<ACL> getAclForPath(String path) {
        return getDefaultAcl();
      }
    };
  }
ACLProvider for providing appropriate ACLs to CuratorFrameworkFactory
service/src/java/org/apache/hive/service/server/HiveServer2.java