[SPARK-56528][CORE] Make Jetty SniHostCheck configurable#55396
Closed
dongjoon-hyun wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-56528][CORE] Make Jetty SniHostCheck configurable#55396dongjoon-hyun wants to merge 1 commit intoapache:masterfrom
dongjoon-hyun wants to merge 1 commit intoapache:masterfrom
Conversation
2ef1608 to
92b5438
Compare
92b5438 to
e04e114
Compare
HyukjinKwon
approved these changes
Apr 19, 2026
Member
Author
|
Thank you, @HyukjinKwon ~ Merged to master for Apache Spark 4.2.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
As a part of SPARK-55556: Improve Web Security, this PR introduces a new configuration
spark.ui.jetty.sniHostCheckEnabledthat controls Jetty's SNI host check on the Spark UI HTTPS connector.sniHostCheckis recommended by Jetty community as we can see that the default value of Jetty istruealready. The previously Spark-side hardcodedSecureRequestCustomizer.setSniHostCheck(false)call inJettyUtilsis replaced with a value driven by this configuration.The default value is
false, preserving the existing behavior introduced in SPARK-45522.Why are the changes needed?
In the Jetty usage,
jetty.ssl.sniHostCheck=falseis supposed to override the default behavior. However, since SPARK-45522 (Jetty 10+), Spark has setSniHostChecktofalsestrictly to preserve backward compatibility with standalone deployments. Operators who want stricter host checking for security have no way to enable it without patching source. Exposing this as a configuration lets users opt in to SNI host checking when desired.Does this PR introduce any user-facing change?
No. A new configuration
spark.ui.jetty.sniHostCheckEnabled(default:false) is added in Spark 4.2.0. The default preserves the current behavior, so existing deployments are unaffected.How was this patch tested?
Pass the CIs.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.7)