You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "YetiCuzMountain (via GitHub)" <gi...@apache.org> on 2023/10/27 06:17:19 UTC
[PR] [WIP][KYUUBI #5460][REST] The kyuubi-ctl scripts should be used to submit app with SSL + SPNEGO [kyuubi]
YetiCuzMountain opened a new pull request, #5548:
URL: https://github.com/apache/kyuubi/pull/5548
<!--
Thanks for sending a pull request!
### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about the use case of it.
2. If you fix a bug, you can clarify why it is a bug.
-->
When i used kyuubi-ctl to submit a batch app, i got the error that
For examples:
bin/kyuubi-ctl list session -b --hostUrl https://myhostname:10099/api --authSchema spnego --spnegoHost myhostname
with Error:
<img width="526" alt="image" src="https://github.com/apache/kyuubi/assets/47157319/1d078705-9cc2-46c4-bf1d-9eb586fae74b">
I tracked the source code and found that KyuubiRestFrontendService was intialized without setting SSL config.
After my fixing, i added some configs about pkcs12 keystore for JettyServer intializing. It works.
Therefore, i wish to help others who need high security level environments.
### _How was this patch tested?_
Could i add some screenshots for manual tests if appropriate?
First, i create the Jetty-9 format keystore in my host and set them to kyuubi-defaults.conf

Then, i submit a batch job using kyuubi-ctl to send rest request to 10099.
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request
### _Was this patch authored or co-authored using generative AI tooling?_
<!--
If a generative AI tooling has been used in the process of authoring this patch, please include
phrase 'Generated-by: ' followed by the name of the tool and its version.
If no, write 'No'.
Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
-->
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [WIP][KYUUBI #5460][REST] The kyuubi-ctl scripts should be used to submit app with SSL + SPNEGO [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #5548:
URL: https://github.com/apache/kyuubi/pull/5548#discussion_r1374128139
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/ui/JettyServer.scala:
##########
@@ -88,20 +97,81 @@ object JettyServer {
server.setHandler(collection)
val serverExecutor = new ScheduledExecutorScheduler(s"$name-JettyScheduler", true)
+
+ val connector = getServerConnector(server, host, port , serverExecutor , kyuubiConf)
+
+ new JettyServer(server, connector, collection)
+ }
+
+ def getServerConnector(
+ server: Server,
Review Comment:
please perform `dev/reformat` to autofix the codestyle
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [WIP][KYUUBI #5460][REST] The kyuubi-ctl scripts should be used to submit app with SSL + SPNEGO [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #5548:
URL: https://github.com/apache/kyuubi/pull/5548#discussion_r1374136906
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/ui/JettyServer.scala:
##########
@@ -71,14 +74,20 @@ private[kyuubi] case class JettyServer(
def getState: String = server.getState
}
-object JettyServer {
+object JettyServer extends Logging{
- def apply(name: String, host: String, port: Int, poolSize: Int): JettyServer = {
+ def apply(name: String, host: String, port: Int, kyuubiConf: KyuubiConf): JettyServer = {
+
+ // set Jetty Server pool size
Review Comment:
the comment usually should be a supplement to the code block which is composed of complex logic. And a good comment explains WHY should we do but not WHAT we are doing, because in most cases, the code is clear enough to answer the latter question
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [WIP][KYUUBI #5460][REST] The kyuubi-ctl scripts should be used to submit app with SSL + SPNEGO [kyuubi]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #5548: [WIP][KYUUBI #5460][REST] The kyuubi-ctl scripts should be used to submit app with SSL + SPNEGO
URL: https://github.com/apache/kyuubi/pull/5548
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [WIP][KYUUBI #5460][REST] The kyuubi-ctl scripts should be used to submit app with SSL + SPNEGO [kyuubi]
Posted by "YetiCuzMountain (via GitHub)" <gi...@apache.org>.
YetiCuzMountain commented on code in PR #5548:
URL: https://github.com/apache/kyuubi/pull/5548#discussion_r1374271449
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/ui/JettyServer.scala:
##########
@@ -71,14 +74,20 @@ private[kyuubi] case class JettyServer(
def getState: String = server.getState
}
-object JettyServer {
+object JettyServer extends Logging{
- def apply(name: String, host: String, port: Int, poolSize: Int): JettyServer = {
+ def apply(name: String, host: String, port: Int, kyuubiConf: KyuubiConf): JettyServer = {
+
+ // set Jetty Server pool size
Review Comment:
I have removed unnecessary annotations.
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [WIP][KYUUBI #5460][REST] The kyuubi-ctl scripts should be used to submit app with SSL + SPNEGO [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #5548:
URL: https://github.com/apache/kyuubi/pull/5548#discussion_r1374133978
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiRestFrontendService.scala:
##########
@@ -72,11 +72,15 @@ class KyuubiRestFrontendService(override val serverable: Serverable)
override def initialize(conf: KyuubiConf): Unit = synchronized {
this.conf = conf
+ // server 是 JettyServer类,
+ // JettyServer.server 是 eclipse jetty类
+ // JettyServer.connector 是 eclipse jetty server的 serverConnector类
Review Comment:
the comment looks does not much help, can you remove it?
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [WIP][KYUUBI #5460][REST] The kyuubi-ctl scripts should be used to submit app with SSL + SPNEGO [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #5548:
URL: https://github.com/apache/kyuubi/pull/5548#discussion_r1374129154
##########
kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala:
##########
@@ -751,6 +751,57 @@ object KyuubiConf {
.booleanConf
.createWithDefault(true)
+ //------------------------Jetty Server-------------------------
+ val FRONTEND_JETTYSERVER_USE_SSL: ConfigEntry[Boolean] =
Review Comment:
after introducing new configurations, perform `dev/gen/gen_all_config_docs.sh` to update the docs.
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [WIP][KYUUBI #5460][REST] The kyuubi-ctl scripts should be used to submit app with SSL + SPNEGO [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #5548:
URL: https://github.com/apache/kyuubi/pull/5548#discussion_r1374132869
##########
kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala:
##########
@@ -751,6 +751,57 @@ object KyuubiConf {
.booleanConf
.createWithDefault(true)
+ //------------------------Jetty Server-------------------------
+ val FRONTEND_JETTYSERVER_USE_SSL: ConfigEntry[Boolean] =
+ buildConf("kyuubi.frontend.jettyServer.use.SSL")
Review Comment:
considering there are existing configurations `kyuubi.frontend.rest.bind.host` and `kyuubi.frontend.rest.bind.port`, let's put those configurations under namespace `kyuubi.frontend.rest.*`
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [WIP][KYUUBI #5460][REST] The kyuubi-ctl scripts should be used to submit app with SSL + SPNEGO [kyuubi]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5548:
URL: https://github.com/apache/kyuubi/pull/5548#issuecomment-1936763480
Thanks for the PR! This PR is being closed due to inactivity. This isn't a judgement on the merit of the PR in any way. If this is still an issue with the latest version of Kyuubi, please reopen it and ask a committer to remove the Stale tag!
Thank you for using Kyuubi!
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org