Merge branch 'cassandra-4.0' into cassandra-4.1

This commit is contained in:
Ekaterina Dimitrova 2023-08-01 13:52:11 -04:00
commit fb7e4e7c48
5 changed files with 11 additions and 2 deletions

View File

@ -1,5 +1,6 @@
4.1.4
Merged from 4.0:
* Fix BulkLoader ignoring cipher suites options (CASSANDRA-18582)
* Migrate Python optparse to argparse (CASSANDRA-17914)
Merged from 3.11:
Merged from 3.0:

View File

@ -404,6 +404,11 @@ public class EncryptionOptions
return ap == null ? new String[0] : ap.toArray(new String[0]);
}
public String[] cipherSuitesArray()
{
return cipher_suites == null ? null : cipher_suites.toArray(new String[0]);
}
public TlsEncryptionPolicy tlsEncryptionPolicy()
{
if (getOptional())

View File

@ -273,8 +273,9 @@ public class BulkLoader
// Temporarily override newSSLEngine to set accepted protocols until it is added to
// RemoteEndpointAwareJdkSSLOptions. See CASSANDRA-13325 and CASSANDRA-16362.
RemoteEndpointAwareJdkSSLOptions sslOptions = new RemoteEndpointAwareJdkSSLOptions(sslContext, null)
RemoteEndpointAwareJdkSSLOptions sslOptions = new RemoteEndpointAwareJdkSSLOptions(sslContext, clientEncryptionOptions.cipherSuitesArray())
{
@Override
protected SSLEngine newSSLEngine(SocketChannel channel, InetSocketAddress remoteEndpoint)
{
SSLEngine engine = super.newSSLEngine(channel, remoteEndpoint);

View File

@ -98,6 +98,7 @@ public class SSTableLoaderEncryptionOptionsTest extends AbstractEncryptionOption
"--truststore", validTrustStorePath,
"--truststore-password", validTrustStorePassword,
"--conf-path", "test/conf/sstableloader_with_encryption.yaml",
"--ssl-ciphers", "TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA",
sstables_to_upload.absolutePath());
tool.assertOnCleanExit();
assertTrue(tool.getStdout().contains("Summary statistics"));

View File

@ -165,8 +165,9 @@ public class JavaDriverClient
// Temporarily override newSSLEngine to set accepted protocols until it is added to
// RemoteEndpointAwareJdkSSLOptions. See CASSANDRA-13325 and CASSANDRA-16362.
RemoteEndpointAwareJdkSSLOptions sslOptions = new RemoteEndpointAwareJdkSSLOptions(sslContext, null)
RemoteEndpointAwareJdkSSLOptions sslOptions = new RemoteEndpointAwareJdkSSLOptions(sslContext, encryptionOptions.cipherSuitesArray())
{
@Override
protected SSLEngine newSSLEngine(SocketChannel channel, InetSocketAddress remoteEndpoint)
{
SSLEngine engine = super.newSSLEngine(channel, remoteEndpoint);