Skip to content

Conversation

@Bouncheck
Copy link

@Bouncheck Bouncheck commented Sep 22, 2025

Adds new test class that verifies the behavior of session tickets.
Relevant only for Scylla clusters and TLSv1.3.

There are two ssl implementations being tested: JDK and Netty.

JDK implementation is tested by tracking javax.net.ssl logs.
The specifics of TLS handshakes are read from them and custom metrics are
collected. It is expected that the client will receive session tickets and
use them when possible. With JDK implementation driver is not expected to be
able to reconnect using solely session resumptions after node restart.
The cache used in Java internal classes (before JDK 24) can hold only 1 ticket
for this purpose. This ticket cannot be reused for simultaneous reconnection to
multiple shards.

Netty implementation is tested by extending RemoteEndpointAwareNettySSLOptions.
The extension called TestableNettySSLOptions should behave nearly identically.
The difference comes from additional listeners and handlers that
are used for collecting statistics about completed handshakes and ClientHellos
sent.
In this implementation the cache stores enough sessions for reconnections, so
the test method for this implementation expects all reconnections to use the
session resumption. The driver also does not attempt to send ClientHello's into
the void before the node gets back up, which would waste the session
information from received tickets.

@Bouncheck Bouncheck self-assigned this Sep 22, 2025
@Bouncheck Bouncheck force-pushed the scylla-3.x-ssl-tests-session-tickets branch from b603ade to da2829a Compare September 22, 2025 23:54
Adds new parameter allowing to specify protocol for SSLContext
when using `getSSLOptions`.
Adds new test class that verifies the behavior of session tickets.
Relevant only for Scylla clusters and TLSv1.3.

There are two ssl implementations being tested: JDK and Netty.

JDK implementation is tested by tracking `javax.net.ssl` logs.
The specifics of TLS handshakes are read from them and custom metrics are
collected. It is expected that the client will receive session tickets and
use them when possible. With JDK implementation driver is not expected to be
able to reconnect using solely session resumptions after node restart.
The cache used in Java internal classes (before JDK 24) can hold only 1 ticket
for this purpose. This ticket cannot be reused for simultaneous reconnection to
multiple shards.

Netty implementation is tested by extending `RemoteEndpointAwareNettySSLOptions`.
The extension called `TestableNettySSLOptions` should behave nearly identically.
The difference comes from additional listeners and handlers that
are used for collecting statistics about completed handshakes and ClientHellos
sent.
In this implementation the cache stores enough sessions for reconnections, so
the test method for this implementation expects all reconnections to use the
session resumption. The driver also does not attempt to send ClientHello's into
the void before the node gets back up, which would waste the session
information from received tickets.
@Bouncheck Bouncheck force-pushed the scylla-3.x-ssl-tests-session-tickets branch from da2829a to 191d29a Compare September 23, 2025 10:10
@dkropachev dkropachev merged commit 0779262 into scylladb:scylla-3.x Sep 25, 2025
10 checks passed
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.

2 participants