Skip to content

Commit 017894d

Browse files
author
wangjunbo
committed
[KYUUBI #6041] doc update
1 parent e0bc999 commit 017894d

File tree

5 files changed

+13
-25
lines changed

5 files changed

+13
-25
lines changed

Diff for: docs/configuration/settings.md

+1
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ You can configure the Kyuubi properties in `$KYUUBI_HOME/conf/kyuubi-defaults.co
249249
| kyuubi.frontend.rest.bind.host | <undefined> | Hostname or IP of the machine on which to run the REST frontend service. | string | 1.4.0 |
250250
| kyuubi.frontend.rest.bind.port | 10099 | Port of the machine on which to run the REST frontend service. | int | 1.4.0 |
251251
| kyuubi.frontend.rest.max.worker.threads | 999 | Maximum number of threads in the frontend worker thread pool for the rest frontend service | int | 1.6.2 |
252+
| kyuubi.frontend.rest.security.enabled | true | Whether to enable kyuubi server restful api secure access. | boolean | 1.9.0 |
252253
| kyuubi.frontend.ssl.keystore.algorithm | <undefined> | SSL certificate keystore algorithm. | string | 1.7.0 |
253254
| kyuubi.frontend.ssl.keystore.password | <undefined> | SSL certificate keystore password. | string | 1.7.0 |
254255
| kyuubi.frontend.ssl.keystore.path | <undefined> | SSL certificate keystore location. | string | 1.7.0 |

Diff for: kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala

+8-8
Original file line numberDiff line numberDiff line change
@@ -797,14 +797,6 @@ object KyuubiConf {
797797
.checkValues(AuthTypes)
798798
.createWithDefault(Seq(AuthTypes.NONE.toString))
799799

800-
val RESTFUL_AUTHENTICATION: ConfigEntry[Boolean] =
801-
buildConf("kyuubi.restful.security.enabled")
802-
.doc("Whether to enable kyuubi server restful api secure access.")
803-
.version("1.9.0")
804-
.serverOnly
805-
.booleanConf
806-
.createWithDefault(true)
807-
808800
val AUTHENTICATION_CUSTOM_CLASS: OptionalConfigEntry[String] =
809801
buildConf("kyuubi.authentication.custom.class")
810802
.doc("User-defined authentication implementation of " +
@@ -1053,6 +1045,14 @@ object KyuubiConf {
10531045
.checkValue(p => p == 0 || (p > 1024 && p < 65535), "Invalid Port number")
10541046
.createWithDefault(10099)
10551047

1048+
val RESTFUL_AUTHENTICATION: ConfigEntry[Boolean] =
1049+
buildConf("kyuubi.frontend.rest.security.enabled")
1050+
.doc("Whether to enable kyuubi server restful api secure access.")
1051+
.version("1.9.0")
1052+
.serverOnly
1053+
.booleanConf
1054+
.createWithDefault(true)
1055+
10561056
val FRONTEND_MYSQL_BIND_HOST: ConfigEntry[Option[String]] =
10571057
buildConf("kyuubi.frontend.mysql.bind.host")
10581058
.doc("Hostname or IP of the machine on which to run the MySQL frontend service.")

Diff for: kyuubi-server/src/test/scala/org/apache/kyuubi/RestClientTestHelper.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ trait RestClientTestHelper extends RestFrontendTestHelper with KerberizedTestHel
3838
super.afterAll()
3939
}
4040

41-
protected val otherConfigs: Map[String, String] = Map.empty
41+
protected def otherConfigs: Map[String, String] = Map.empty
4242

4343
override protected lazy val conf: KyuubiConf = {
4444
val config = new Configuration()

Diff for: kyuubi-server/src/test/scala/org/apache/kyuubi/operation/KyuubiRestAuthenticationSuite.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import org.apache.kyuubi.session.KyuubiSession
3636

3737
class KyuubiRestAuthenticationSuite extends RestClientTestHelper {
3838

39-
override protected val otherConfigs: Map[String, String] = {
39+
override protected def otherConfigs: Map[String, String] = {
4040
Map(
4141
KyuubiConf.ENGINE_SECURITY_ENABLED.key -> "true",
4242
KyuubiConf.ENGINE_SECURITY_SECRET_PROVIDER.key -> "simple",

Diff for: kyuubi-server/src/test/scala/org/apache/kyuubi/operation/KyuubiRestDisableAuthenticationSuite.scala

+2-15
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,14 @@ package org.apache.kyuubi.operation
2020
import javax.servlet.http.HttpServletResponse
2121

2222
import org.apache.kyuubi.config.KyuubiConf
23-
import org.apache.kyuubi.service.authentication.InternalSecurityAccessor
2423

2524
class KyuubiRestDisableAuthenticationSuite extends KyuubiRestAuthenticationSuite {
2625

2726
override protected val otherConfigs: Map[String, String] = {
28-
Map(
29-
KyuubiConf.RESTFUL_AUTHENTICATION.key -> "false",
30-
KyuubiConf.ENGINE_SECURITY_ENABLED.key -> "true",
31-
KyuubiConf.ENGINE_SECURITY_SECRET_PROVIDER.key -> "simple",
32-
KyuubiConf.SIMPLE_SECURITY_SECRET_PROVIDER_PROVIDER_SECRET.key -> "_KYUUBI_REST_",
33-
// allow to impersonate other users with spnego authentication
34-
s"hadoop.proxyuser.$clientPrincipalUser.groups" -> "*",
35-
s"hadoop.proxyuser.$clientPrincipalUser.hosts" -> "*")
27+
super.otherConfigs + (KyuubiConf.RESTFUL_AUTHENTICATION.key -> "false")
3628
}
3729

38-
override def beforeAll(): Unit = {
39-
super.beforeAll()
40-
InternalSecurityAccessor.initialize(conf, true)
41-
}
42-
43-
test("test without authorization when disable kyuubi.restful.security.enabled") {
30+
test("test without authorization when disable restful api authentication") {
4431
val response = webTarget.path("api/v1/sessions/count")
4532
.request()
4633
.get()

0 commit comments

Comments
 (0)