Skip to content

[SPARK-54293][SQL] Disable SNI host check in ThriftHttpCLIService#55308

Open
yadavay-amzn wants to merge 1 commit intoapache:masterfrom
yadavay-amzn:fix/SPARK-54293-sni-host-check
Open

[SPARK-54293][SQL] Disable SNI host check in ThriftHttpCLIService#55308
yadavay-amzn wants to merge 1 commit intoapache:masterfrom
yadavay-amzn:fix/SPARK-54293-sni-host-check

Conversation

@yadavay-amzn
Copy link
Copy Markdown

@yadavay-amzn yadavay-amzn commented Apr 11, 2026

What changes were proposed in this pull request?

Disable SNI host check in ThriftHttpCLIService by adding a SecureRequestCustomizer with setSniHostCheck(false) to the Jetty SSL connector configuration.

This is the same fix that was applied to JettyUtils.scala in SPARK-45522 when Spark upgraded from Jetty 9 to Jetty 10, but was missed for ThriftHttpCLIService.

Why are the changes needed?

Since Jetty 10, SniHostCheck defaults to true. This was disabled in the Spark UI server (SPARK-45522) but not in ThriftHttpCLIService, which also creates a Jetty server with SSL support. Without this fix, the Hive Thrift HTTP server may reject HTTPS connections when the SNI hostname does not match the certificate.

Note on RestSubmissionServer: The JIRA also mentions RestSubmissionServer, but after reviewing the code, it has no SSL support — it only creates plain HTTP connectors. The SNI host check only applies to HTTPS, so RestSubmissionServer does not need this fix.

Does this PR introduce any user-facing change?

No. This restores the pre-Jetty 10 behavior where SNI host check was not enforced.

How was this patch tested?

  • mvn install -pl sql/hive-thriftserver -am -DskipTests -Phive -Phive-thriftserver compiles successfully with zero errors.
  • The change follows the exact same pattern as the existing fix in JettyUtils.scala (lines 337-341).

Was this patch authored or co-authored using generative AI tooling?

No

Disable SNI host check in ThriftHttpCLIService's Jetty SSL connector,
consistent with the fix applied to JettyUtils.scala in SPARK-45522.

Since Jetty 10, SniHostCheck defaults to true. This was fixed in the
Spark UI server but not in ThriftHttpCLIService, which also creates a
Jetty server with SSL support.

Note: RestSubmissionServer (also mentioned in the JIRA) does not have
SSL support, so it does not need this fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant