Skip to content

Commit b5c2bd0

Browse files
committed
Workaround JDK-8213202 in SSLClientAuthTests
This change works around JDK-8213202, which is a bug related to TLSv1.3 session resumption before JDK 11.0.3 that occurs when there are multiple concurrent sessions being established. Nodes connecting to each other will trigger this bug when client authentication is disabled, which is the case for SSLClientAuthTests. Backport of elastic#46680
1 parent 5ca37db commit b5c2bd0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/ssl/SSLClientAuthTests.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ protected Settings nodeSettings(int nodeOrdinal) {
9696
return builder
9797
// invert the require auth settings
9898
.put("xpack.security.transport.ssl.client_authentication", SSLClientAuth.NONE)
99+
// Due to the TLSv1.3 bug with session resumption when client authentication is not
100+
// used, we need to set the protocols since we disabled client auth for transport
101+
// to avoid failures on pre 11.0.3 JDKs. See #getProtocols
102+
.putList("xpack.security.transport.ssl.supported_protocols", getProtocols())
99103
.put("xpack.security.http.ssl.enabled", true)
100104
.put("xpack.security.http.ssl.client_authentication", SSLClientAuth.REQUIRED)
101105
.build();

0 commit comments

Comments
 (0)