tolbertam commented on code in PR #2969:
URL: https://github.com/apache/cassandra/pull/2969#discussion_r1417896816


##########
test/unit/org/apache/cassandra/cql3/CQLTester.java:
##########
@@ -533,6 +535,27 @@ public void setup()
         AuthCacheService.initializeAndRegisterCaches();
     }
 
+    /**
+     * Configures the server to require client encryption for CQL.  Useful for 
tests which exercise TLS specific
+     * behavior.
+     * <p>
+     * Note to use this appropriately, {@link #requireNetwork} should be given 
a server configurator configured
+     * with {@link 
Server.Builder#withTlsEncryptionPolicy(EncryptionOptions.TlsEncryptionPolicy)} 
using
+     * {@link 
org.apache.cassandra.config.EncryptionOptions.TlsEncryptionPolicy#ENCRYPTED}.
+     */
+    protected static void requireNativeProtocolClientEncryption()
+    {
+        
DatabaseDescriptor.updateNativeProtocolEncryptionOptions((encryptionOptions ->
+                encryptionOptions.withEnabled(true)
+                        .withKeyStore("test/conf/cassandra_ssl_test.keystore")
+                        .withKeyStorePassword("cassandra")
+                        
.withTrustStore("test/conf/cassandra_ssl_test.truststore")
+                        .withTrustStorePassword("cassandra")
+                        .withRequireEndpointVerification(false)
+                        .withRequireClientAuth(true)));

Review Comment:
   This needs to be reasoned about after rebasing with CASSANDRA-18811 fix



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to