jiaoqingbo opened a new issue #2156: URL: https://github.com/apache/incubator-kyuubi/issues/2156
### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) ### Search before asking - [X] I have searched in the [issues](https://github.com/apache/incubator-kyuubi/issues?q=is%3Aissue) and found no similar issues. ### What would you like to be improved? In HiveDelegationTokenProvider.scala when forget to Specify Hive metastore configurations In $KYUUBI_HOME/conf/kyuubi-defaults.conf or Place hive-site.xml into $KYUUBI_HOME/conf,the metastoreUris will be empty,which will make the if condition return false,cause the client is null。 if (SecurityUtil.getAuthenticationMethod(hadoopConf) != AuthenticationMethod.SIMPLE && _metastoreUris.nonEmpty_ && conf.getBoolean("hive.metastore.sasl.enabled", false)) { val principalKey = "hive.metastore.kerberos.principal" principal = conf.getTrimmed(principalKey, "") require(principal.nonEmpty, s"Hive principal $principalKey undefined") client = Some(RetryingMetaStoreClient.getProxy(conf, false)) info(s"Created HiveMetaStoreClient with metastore uris $metastoreUris") } override def delegationTokensRequired(): Boolean = client.nonEmpty In HadoopCredentialsManager,provider.delegationTokensRequired will return false,the log is Inaccurate, override def initialize(conf: KyuubiConf): Unit = { hadoopConf = KyuubiHadoopUtils.newHadoopConf(conf) providers = HadoopCredentialsManager.loadProviders(conf) .filter { case (_, provider) => provider.initialize(hadoopConf, conf) _val required = provider.delegationTokensRequired()_ if (!required) { warn(s"Service ${provider.serviceName} does not require a token." + s" Check your configuration to see if security is disabled or not.") provider.close() } required } if (providers.isEmpty) { warn("No delegation token is required by services.") } else { info("Using the following builtin delegation token providers: " + s"${providers.keys.mkString(", ")}.") } ### How should we improve? “Check your configuration to see if security is disabled or not.” should be changed to “Check your configuration to see if security is disabled or not.If security is enabled,some configuration of ${provider.serviceName} is missing” ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
