You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "PakhomovAlexander (via GitHub)" <gi...@apache.org> on 2023/03/14 18:27:08 UTC

[GitHub] [ignite-3] PakhomovAlexander commented on a diff in pull request #1779: IGNITE-18828 Add ciphers support to SSL (jdbc, client, scalecube)

PakhomovAlexander commented on code in PR #1779:
URL: https://github.com/apache/ignite-3/pull/1779#discussion_r1136020766


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/ssl/ItSslTest.java:
##########
@@ -532,4 +512,65 @@ void jdbcCanConnectWithSslAndClientAuth() throws SQLException {
             }
         }
     }
+
+    @Test
+    @DisplayName("Cluster is not initialized when nodes are configured with incompatible ciphers")
+    void incompatibleCiphersNodes(@WorkDirectory Path workDir, TestInfo testInfo) {
+        Cluster cluster = new Cluster(testInfo, workDir);
+
+        String sslEnabledWithCipher1BoostrapConfig = createBoostrapConfig("TLS_AES_256_GCM_SHA384");
+        String sslEnabledWithCipher2BoostrapConfig = createBoostrapConfig("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384");
+
+        CompletableFuture<IgniteImpl> node1 = cluster.startClusterNode(0, sslEnabledWithCipher1BoostrapConfig);
+        CompletableFuture<IgniteImpl> node2 = cluster.startClusterNode(1, sslEnabledWithCipher2BoostrapConfig);
+
+        String metaStorageAndCmgNodeName = testNodeName(testInfo, 0);
+
+        InitParameters initParameters = InitParameters.builder()
+                .destinationNodeName(metaStorageAndCmgNodeName)
+                .metaStorageNodeNames(List.of(metaStorageAndCmgNodeName))
+                .clusterName("cluster")
+                .build();
+
+        IgnitionManager.init(initParameters);
+
+        // First node will initialize the cluster with single node successfully since the second node can't connect to it.
+        assertThat(node1, willCompleteSuccessfully());
+        assertThat(node2, willTimeoutIn(1, TimeUnit.SECONDS));

Review Comment:
   Are we sure 100% that `node1` will always be the first node that is started? It there a chance that `node2` will be the first and will start successfully? I think this place is the potential fluky test. I would ask you to do the following:
   
   ```java 
   CompletableFuture<IgniteImpl> node1 = cluster.startClusterNode(0, sslEnabledWithCipher1BoostrapConfig);
   assertThat(node1, willCompleteSuccessfully());
   
   CompletableFuture<IgniteImpl> node2 = cluster.startClusterNode(1, sslEnabledWithCipher2BoostrapConfig);



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org