You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/12/29 13:38:15 UTC

[GitHub] [ignite] timoninmaxim commented on a change in pull request #8623: IGNITE-13895: SSL usage in ducktape tests

timoninmaxim commented on a change in pull request #8623:
URL: https://github.com/apache/ignite/pull/8623#discussion_r549703630



##########
File path: modules/ducktests/tests/docker/run_tests.sh
##########
@@ -158,5 +158,7 @@ if [[ -n "$MAX_PARALLEL" ]]; then
   DUCKTAPE_OPTIONS="$DUCKTAPE_OPTIONS --max-parallel $MAX_PARALLEL"
 fi
 
+"$SCRIPT_DIR"/../certs/mkcerts.sh

Review comment:
       This is mechanism for docker env. How is it going to be distributed on real nodes on Jenkins? 

##########
File path: modules/ducktests/tests/certs/functions.sh
##########
@@ -0,0 +1,92 @@
+#!/usr/bin/env bash
+
+function makeRoot() {
+    ALIAS=$1
+    DNAME=$2
+    PSWD=$3
+
+    if [[ ${ALIAS} == "" ]] || [[ ${DNAME} == "" ]] || [[ ${PSWD} == "" ]]
+    then
+        error "makeRoot: Need ALIAS, DNAME, PSWD"
+    fi
+
+    rm ${ALIAS}.jks
+    rm ${ALIAS}.pem
+
+    keytool -genkeypair -keystore ${ALIAS}.jks -alias ${ALIAS} -dname "${DNAME}" -ext bc:c -storepass ${PSWD} \

Review comment:
       Please check bash checkstyle with Inteliij IDEA plugin. It will write down all possible issues. At least ${PSWD} must be in quotes, as it can contain special symbols like &.

##########
File path: modules/ducktests/tests/ignitetest/services/utils/control_utility.py
##########
@@ -31,9 +31,17 @@ class ControlUtility:
     """
     BASE_COMMAND = "control.sh"
 
-    def __init__(self, cluster, text_context):
+    def __init__(self, cluster,
+                 key_store_jks: str = None, key_store_pwd: str = "123456",

Review comment:
       Password 123456 is a magic variable. Are there any alternatives? Config, global variable, param, or smth else?
   At least setting global variable in run_tests.sh looks better.

##########
File path: modules/ducktests/tests/ignitetest/tests/ssl_test.py
##########
@@ -0,0 +1,70 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""
+This module contains ssl tests.
+"""
+from ignitetest.services.ignite import IgniteService
+from ignitetest.services.ignite_app import IgniteApplicationService
+from ignitetest.services.utils.control_utility import ControlUtility
+from ignitetest.services.utils.ignite_configuration import IgniteConfiguration, SslContextFactory
+from ignitetest.services.utils.ignite_configuration.connector_configuration import ConnectorConfiguration
+from ignitetest.services.utils.ignite_configuration.discovery import from_ignite_cluster
+from ignitetest.utils import ignite_versions, cluster
+from ignitetest.utils.ignite_test import IgniteTest
+from ignitetest.utils.version import DEV_BRANCH, IgniteVersion, LATEST_2_9, LATEST_2_8
+
+
+# pylint: disable=W0223
+class SslTest(IgniteTest):
+    """
+    Ssl test.
+    """
+    @cluster(num_nodes=3)
+    @ignite_versions(str(DEV_BRANCH), str(LATEST_2_9), str(LATEST_2_8))

Review comment:
       Actually do we need check of LATEST versions?




----------------------------------------------------------------
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.

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