You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "paul8263 (via GitHub)" <gi...@apache.org> on 2024/08/14 07:07:12 UTC
[PR] [KYUUBI #6615] Added a switch for enabling/disabling jetty sending se… [kyuubi]
paul8263 opened a new pull request, #6616:
URL: https://github.com/apache/kyuubi/pull/6616
…rver version in response.
# :mag: Description
## Issue References 🔗
<!-- Append the issue number after #. If there is no issue for you to link create one or -->
<!-- If there are no issues to link, please provide details here. -->
This pull request fixes #6615
## Describe Your Solution 🔧
Add a config item that controls whether Jetty should send its version in response.
Sending Jetty version could be disabled by calling HttpConfiguration::setSendServerVersion(false)
## Types of changes :bookmark:
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Test Plan 🧪
Compiled and tested manually.
---
# Checklist 📝
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)
**Be nice. Be informative.**
--
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] [KYUUBI #6615] Added a switch for enabling/disabling jetty sending se… [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #6616:
URL: https://github.com/apache/kyuubi/pull/6616#discussion_r1716484149
##########
kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala:
##########
@@ -700,6 +700,14 @@ object KyuubiConf {
.booleanConf
.createWithDefault(true)
+ val FRONTEND_JETTY_SEND_VERSION_ENABLED: ConfigEntry[Boolean] =
+ buildConf("kyuubi.frontend.jetty.send.version.enabled")
+ .doc("When true, Kyuubi will send Jetty version in HTTP response, " +
+ "which may expose vulnerability")
Review Comment:
> which may expose vulnerability
please avoid such thrilling words in user-facing docs
```suggestion
.doc("Whether to send Jetty version in HTTP response.")
```
--
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] [KYUUBI #6615] Make Jetty sending server version in response configurable [kyuubi]
Posted by "paul8263 (via GitHub)" <gi...@apache.org>.
paul8263 commented on PR #6616:
URL: https://github.com/apache/kyuubi/pull/6616#issuecomment-2290217960
> @paul8263 please run `dev/gen/gen_all_config_docs.sh` to regenerate docs.
Thanks. It should be good as there is a way to generate the doc. In the previous commit I editted the doc manually, but put the new configuration in the wrong chapter. The latest commit should be correct.
--
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] [KYUUBI #6615] Make Jetty sending server version in response configurable [kyuubi]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #6616:
URL: https://github.com/apache/kyuubi/pull/6616#issuecomment-2290476874
## [Codecov](https://app.codecov.io/gh/apache/kyuubi/pull/6616?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `0%` with `12 lines` in your changes missing coverage. Please review.
> Project coverage is 0.00%. Comparing base [(`d2ead6b`)](https://app.codecov.io/gh/apache/kyuubi/commit/d2ead6bb243996f86d5f7f7475cadd3bc2c5dfd8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`c1567fd`)](https://app.codecov.io/gh/apache/kyuubi/commit/c1567fdfa80613410c24be3947734f000e0ca9d7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 3 commits behind head on master.
| [Files](https://app.codecov.io/gh/apache/kyuubi/pull/6616?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...in/scala/org/apache/kyuubi/config/KyuubiConf.scala](https://app.codecov.io/gh/apache/kyuubi/pull/6616?src=pr&el=tree&filepath=kyuubi-common%2Fsrc%2Fmain%2Fscala%2Forg%2Fapache%2Fkyuubi%2Fconfig%2FKyuubiConf.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jb25maWcvS3l1dWJpQ29uZi5zY2FsYQ==) | 0.00% | [5 Missing :warning: ](https://app.codecov.io/gh/apache/kyuubi/pull/6616?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...ache/kyuubi/server/KyuubiRestFrontendService.scala](https://app.codecov.io/gh/apache/kyuubi/pull/6616?src=pr&el=tree&filepath=kyuubi-server%2Fsrc%2Fmain%2Fscala%2Forg%2Fapache%2Fkyuubi%2Fserver%2FKyuubiRestFrontendService.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvS3l1dWJpUmVzdEZyb250ZW5kU2VydmljZS5zY2FsYQ==) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/kyuubi/pull/6616?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...che/kyuubi/server/KyuubiTHttpFrontendService.scala](https://app.codecov.io/gh/apache/kyuubi/pull/6616?src=pr&el=tree&filepath=kyuubi-server%2Fsrc%2Fmain%2Fscala%2Forg%2Fapache%2Fkyuubi%2Fserver%2FKyuubiTHttpFrontendService.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvS3l1dWJpVEh0dHBGcm9udGVuZFNlcnZpY2Uuc2NhbGE=) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/kyuubi/pull/6616?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...che/kyuubi/server/KyuubiTrinoFrontendService.scala](https://app.codecov.io/gh/apache/kyuubi/pull/6616?src=pr&el=tree&filepath=kyuubi-server%2Fsrc%2Fmain%2Fscala%2Forg%2Fapache%2Fkyuubi%2Fserver%2FKyuubiTrinoFrontendService.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvS3l1dWJpVHJpbm9Gcm9udGVuZFNlcnZpY2Uuc2NhbGE=) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/kyuubi/pull/6616?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...cala/org/apache/kyuubi/server/ui/JettyServer.scala](https://app.codecov.io/gh/apache/kyuubi/pull/6616?src=pr&el=tree&filepath=kyuubi-server%2Fsrc%2Fmain%2Fscala%2Forg%2Fapache%2Fkyuubi%2Fserver%2Fui%2FJettyServer.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvdWkvSmV0dHlTZXJ2ZXIuc2NhbGE=) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/kyuubi/pull/6616?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #6616 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 677 677
Lines 41907 41917 +10
Branches 5721 5721
======================================
- Misses 41907 41917 +10
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/kyuubi/pull/6616?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
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] [KYUUBI #6615] Added a switch for enabling/disabling jetty sending se… [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #6616:
URL: https://github.com/apache/kyuubi/pull/6616#discussion_r1716481441
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/ui/JettyServer.scala:
##########
@@ -78,7 +78,8 @@ object JettyServer {
host: String,
port: Int,
poolSize: Int,
- stopTimeout: Long): JettyServer = {
+ stopTimeout: Long,
+ shouldSendJettyVersion: Boolean = true): JettyServer = {
Review Comment:
shouldSendJettyVersion => sendServerVersion
do we really need such a default value?
--
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] [KYUUBI #6615] Make Jetty sending server version in response configurable [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #6616:
URL: https://github.com/apache/kyuubi/pull/6616#issuecomment-2292820705
Thanks, merged to master/1.9
--
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] [KYUUBI #6615] Make Jetty sending server version in response configurable [kyuubi]
Posted by "paul8263 (via GitHub)" <gi...@apache.org>.
paul8263 commented on code in PR #6616:
URL: https://github.com/apache/kyuubi/pull/6616#discussion_r1716502032
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/ui/JettyServer.scala:
##########
@@ -78,7 +78,8 @@ object JettyServer {
host: String,
port: Int,
poolSize: Int,
- stopTimeout: Long): JettyServer = {
+ stopTimeout: Long,
+ shouldSendJettyVersion: Boolean = true): JettyServer = {
Review Comment:
Hi @pan3793 ,
Thanks for your suggestion. As long as there are only 2 places calling the constructor of JettyServer, we could remove the default value for the new introduced sendServerVersion parameter.
--
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] [KYUUBI #6615] Added a switch for enabling/disabling jetty sending se… [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #6616:
URL: https://github.com/apache/kyuubi/pull/6616#discussion_r1716485177
##########
kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala:
##########
@@ -700,6 +700,14 @@ object KyuubiConf {
.booleanConf
.createWithDefault(true)
+ val FRONTEND_JETTY_SEND_VERSION_ENABLED: ConfigEntry[Boolean] =
+ buildConf("kyuubi.frontend.jetty.send.version.enabled")
Review Comment:
```suggestion
buildConf("kyuubi.frontend.jetty.sendVersion.enabled")
```
--
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] [KYUUBI #6615] Make Jetty sending server version in response configurable [kyuubi]
Posted by "paul8263 (via GitHub)" <gi...@apache.org>.
paul8263 commented on code in PR #6616:
URL: https://github.com/apache/kyuubi/pull/6616#discussion_r1716502032
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/ui/JettyServer.scala:
##########
@@ -78,7 +78,8 @@ object JettyServer {
host: String,
port: Int,
poolSize: Int,
- stopTimeout: Long): JettyServer = {
+ stopTimeout: Long,
+ shouldSendJettyVersion: Boolean = true): JettyServer = {
Review Comment:
Hi @pan3793 ,
Thanks for your suggestion. As long as there are only 2 places calling the constructor of JettyServer. We could remove the default value for the new introduced sendServerVersion parameter.
--
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] [KYUUBI #6615] Make Jetty sending server version in response configurable [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #6616:
URL: https://github.com/apache/kyuubi/pull/6616#issuecomment-2288409298
@paul8263 please run `dev/gen/gen_all_config_docs.sh` to regenerate 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] [KYUUBI #6615] Make Jetty sending server version in response configurable [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 closed pull request #6616: [KYUUBI #6615] Make Jetty sending server version in response configurable
URL: https://github.com/apache/kyuubi/pull/6616
--
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