File tree 5 files changed +13
-25
lines changed
kyuubi-common/src/main/scala/org/apache/kyuubi/config
kyuubi-server/src/test/scala/org/apache/kyuubi
5 files changed +13
-25
lines changed Original file line number Diff line number Diff line change @@ -249,6 +249,7 @@ You can configure the Kyuubi properties in `$KYUUBI_HOME/conf/kyuubi-defaults.co
249
249
| kyuubi.frontend.rest.bind.host | < ; undefined> ; | Hostname or IP of the machine on which to run the REST frontend service. | string | 1.4.0 |
250
250
| kyuubi.frontend.rest.bind.port | 10099 | Port of the machine on which to run the REST frontend service. | int | 1.4.0 |
251
251
| 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 |
252
253
| kyuubi.frontend.ssl.keystore.algorithm | < ; undefined> ; | SSL certificate keystore algorithm. | string | 1.7.0 |
253
254
| kyuubi.frontend.ssl.keystore.password | < ; undefined> ; | SSL certificate keystore password. | string | 1.7.0 |
254
255
| kyuubi.frontend.ssl.keystore.path | < ; undefined> ; | SSL certificate keystore location. | string | 1.7.0 |
Original file line number Diff line number Diff line change @@ -797,14 +797,6 @@ object KyuubiConf {
797
797
.checkValues(AuthTypes )
798
798
.createWithDefault(Seq (AuthTypes .NONE .toString))
799
799
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
-
808
800
val AUTHENTICATION_CUSTOM_CLASS : OptionalConfigEntry [String ] =
809
801
buildConf(" kyuubi.authentication.custom.class" )
810
802
.doc(" User-defined authentication implementation of " +
@@ -1053,6 +1045,14 @@ object KyuubiConf {
1053
1045
.checkValue(p => p == 0 || (p > 1024 && p < 65535 ), " Invalid Port number" )
1054
1046
.createWithDefault(10099 )
1055
1047
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
+
1056
1056
val FRONTEND_MYSQL_BIND_HOST : ConfigEntry [Option [String ]] =
1057
1057
buildConf(" kyuubi.frontend.mysql.bind.host" )
1058
1058
.doc(" Hostname or IP of the machine on which to run the MySQL frontend service." )
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ trait RestClientTestHelper extends RestFrontendTestHelper with KerberizedTestHel
38
38
super .afterAll()
39
39
}
40
40
41
- protected val otherConfigs : Map [String , String ] = Map .empty
41
+ protected def otherConfigs : Map [String , String ] = Map .empty
42
42
43
43
override protected lazy val conf : KyuubiConf = {
44
44
val config = new Configuration ()
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ import org.apache.kyuubi.session.KyuubiSession
36
36
37
37
class KyuubiRestAuthenticationSuite extends RestClientTestHelper {
38
38
39
- override protected val otherConfigs : Map [String , String ] = {
39
+ override protected def otherConfigs : Map [String , String ] = {
40
40
Map (
41
41
KyuubiConf .ENGINE_SECURITY_ENABLED .key -> " true" ,
42
42
KyuubiConf .ENGINE_SECURITY_SECRET_PROVIDER .key -> " simple" ,
Original file line number Diff line number Diff line change @@ -20,27 +20,14 @@ package org.apache.kyuubi.operation
20
20
import javax .servlet .http .HttpServletResponse
21
21
22
22
import org .apache .kyuubi .config .KyuubiConf
23
- import org .apache .kyuubi .service .authentication .InternalSecurityAccessor
24
23
25
24
class KyuubiRestDisableAuthenticationSuite extends KyuubiRestAuthenticationSuite {
26
25
27
26
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" )
36
28
}
37
29
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" ) {
44
31
val response = webTarget.path(" api/v1/sessions/count" )
45
32
.request()
46
33
.get()
You can’t perform that action at this time.
0 commit comments