livy-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mgaido91 <...@git.apache.org>
Subject [GitHub] incubator-livy pull request #117: [LIVY-502] Remove dependency on hive-exec
Date Thu, 29 Nov 2018 09:54:16 GMT
Github user mgaido91 commented on a diff in the pull request:

    https://github.com/apache/incubator-livy/pull/117#discussion_r237416944
  
    --- Diff: thriftserver/server/src/main/scala/org/apache/livy/thriftserver/auth/PlainSaslServer.scala
---
    @@ -0,0 +1,184 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.livy.thriftserver.auth
    +
    +
    +import java.io.IOException
    +import java.security.{Provider, Security}
    +import java.util
    +import javax.security.auth.callback.Callback
    +import javax.security.auth.callback.CallbackHandler
    +import javax.security.auth.callback.NameCallback
    +import javax.security.auth.callback.PasswordCallback
    +import javax.security.auth.callback.UnsupportedCallbackException
    +import javax.security.auth.login.LoginException
    +import javax.security.sasl._
    +
    +import org.apache.hive.service.auth.AuthenticationProviderFactory.AuthMethods
    +import org.apache.thrift.transport.TSaslServerTransport
    +
    +import org.apache.livy.LivyConf
    +
    +
    +/**
    + * Sun JDK only provides a PLAIN client and no server. This class implements the Plain
SASL server
    + * conforming to RFC #4616 (http://www.ietf.org/rfc/rfc4616.txt).
    + */
    +class PlainSaslServer private[auth] (
    --- End diff --
    
    I think you answered yourself to this comment in https://github.com/apache/incubator-livy/pull/117#discussion_r237319439.
In this case, the Hive classes implemented here (see PlainSaslHelper) depend on `ThriftCLIService`
which depends on `HiveConf`. Moreover some of them are final, so it is not easy to override
them.


---

Mime
View raw message