[
https://issues.apache.org/jira/browse/HADOOP-20100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shilun Fan resolved HADOOP-20100.
---------------------------------
Fix Version/s: 3.6.0
Hadoop Flags: Reviewed
Resolution: Fixed
> Stabilize TestSSLHttpServerMTLS when TLS rejection causes a socket error
> ------------------------------------------------------------------------
>
> Key: HADOOP-20100
> URL: https://issues.apache.org/jira/browse/HADOOP-20100
> Project: Hadoop Common
> Issue Type: Bug
> Components: build, common
> Reporter: Shilun Fan
> Assignee: Shilun Fan
> Priority: Minor
> Labels: pull-request-available
> Fix For: 3.6.0
>
>
> h2. *Description*
> *{{TestSSLHttpServerMTLS.testUntrustedClientIsRejected}}* currently requires
> the client to receive an *{{SSLHandshakeException}}* when presenting an
> untrusted certificate.
> Depending on the timing of the TLS handshake and connection closure, the
> client can instead receive a {*}{{SocketException}}{*}, such as {*}{{Broken
> pipe}}{*}. The test then fails even though the server rejects the connection
> during the TLS handshake.
> Observed in the [common / Java 17 CI
> job|https://github.com/smengcl/hadoop/actions/runs/45576683369/job/139084453099]
> for PR #9030:
> {code:java}
> Unexpected exception type thrown,
> expected: <javax.net.ssl.SSLHandshakeException>
> but was: <java.net.SocketException>
> Caused by: java.net.SocketException: Broken pipe
> {code}
> h2. *Proposed change*
> Allow the client request to fail with an {*}{{IOException}}{*}, and
> additionally capture the server-side TLS handshake failure using a Jetty
> {*}{{SslHandshakeListener}}{*}. Assert that the server reports an
> {*}{{SSLHandshakeException}}{*}, so an unrelated client I/O failure alone
> cannot satisfy the test.
> Add bounded connection/read timeouts and ensure connections and listeners are
> cleaned up in *{{finally}}* blocks.
> This change affects test code only.
> h2. *Validation*
> Ran {{TestSSLHttpServerMTLS}} locally: 2 tests passed, with no failures,
> errors, or skips.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]