diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala index 0d04e84aa28..b78eeec6fc9 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala @@ -26,7 +26,7 @@ import scala.collection.JavaConverters._ import org.apache.kyuubi.{Logging, Utils} import org.apache.kyuubi.engine.ShareLevel -import org.apache.kyuubi.service.authentication.{AuthTypes, SaslQOP} +import org.apache.kyuubi.service.authentication.{PlainAuthTypes, SaslQOP} case class KyuubiConf(loadSysDefault: Boolean = true) extends Logging { import KyuubiConf._ @@ -136,7 +136,9 @@ case class KyuubiConf(loadSysDefault: Boolean = true) extends Logging { FRONTEND_THRIFT_BINARY_BIND_PORT, FRONTEND_REST_BIND_HOST, FRONTEND_REST_BIND_PORT, - AUTHENTICATION_METHOD, + AUTHENTICATION_SASL_ENABLED, + AUTHENTICATION_SASL_KERBEROS_ENABLED, + AUTHENTICATION_SASL_PLAIN_AUTH_TYPE, SERVER_KEYTAB, SERVER_PRINCIPAL, KINIT_INTERVAL) @@ -372,6 +374,31 @@ object KyuubiConf { .version("1.4.0") .fallbackConf(FRONTEND_LOGIN_BACKOFF_SLOT_LENGTH) + val AUTHENTICATION_SASL_ENABLED: ConfigEntry[Boolean] = buildConf("authentication.sasl.enabled") + .doc("Whether enable SASL mechanism for authentication") + .version("1.4.0") + .booleanConf + .createWithDefault(true) + + val AUTHENTICATION_SASL_KERBEROS_ENABLED: ConfigEntry[Boolean] = + buildConf("authentication.sasl.kerberos.enabled") + .doc("Whether enable GSSAPI/kerberos mechanism for SASL authentication") + .version("1.4.0") + .booleanConf + .createWithDefault(false) + + val AUTHENTICATION_SASL_PLAIN_AUTH_TYPE: OptionalConfigEntry[String] = + buildConf("authentication.sasl.plain.auth.type") + .doc("Client authentication types for PLAIN mechanism.") + .version("1.4.0") + .stringConf + .transform(_.toUpperCase(Locale.ROOT)) + .checkValues(PlainAuthTypes.values.map(_.toString)) + .createOptional + val AUTHENTICATION_METHOD: ConfigEntry[String] = buildConf("authentication") .doc("Client authentication types.