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 12:40:02 UTC

[GitHub] [ignite] Sega76 opened a new pull request #8623: Ignite 13895

Sega76 opened a new pull request #8623:
URL: https://github.com/apache/ignite/pull/8623


   Thank you for submitting the pull request to the Apache Ignite.
   
   In order to streamline the review of the contribution 
   we ask you to ensure the following steps have been taken:
   
   ### The Contribution Checklist
   - [ ] There is a single JIRA ticket related to the pull request. 
   - [ ] The web-link to the pull request is attached to the JIRA ticket.
   - [ ] The JIRA ticket has the _Patch Available_ state.
   - [ ] The pull request body describes changes that have been made. 
   The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
   - [ ] The pull request title is treated as the final commit message. 
   The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
   - [ ] A reviewer has been mentioned through the JIRA comments 
   (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) 
   - [ ] The pull request has been checked by the Teamcity Bot and 
   the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html))
   
   ### Notes
   - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
   - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
   - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
   - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
   
   If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
   


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



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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
Sega76 commented on a change in pull request #8623:
URL: https://github.com/apache/ignite/pull/8623#discussion_r559808698



##########
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:
       I think yes, these versions are now used




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



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

Posted by GitBox <gi...@apache.org>.
nizhikov commented on a change in pull request #8623:
URL: https://github.com/apache/ignite/pull/8623#discussion_r567612324



##########
File path: modules/ducktests/tests/ignitetest/services/ignite_app.py
##########
@@ -16,14 +16,14 @@
 """
 This module contains the base class to build Ignite aware application written on java.
 """
-

Review comment:
       Why this change?




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



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

Posted by GitBox <gi...@apache.org>.
Sega76 commented on a change in pull request #8623:
URL: https://github.com/apache/ignite/pull/8623#discussion_r559808140



##########
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:
       fixed




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



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

Posted by GitBox <gi...@apache.org>.
Sega76 commented on a change in pull request #8623:
URL: https://github.com/apache/ignite/pull/8623#discussion_r559808061



##########
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:
       first certificates are generated, then copied to the nodes




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



[GitHub] [ignite] nizhikov merged pull request #8623: IGNITE-13895: SSL usage in ducktape tests

Posted by GitBox <gi...@apache.org>.
nizhikov merged pull request #8623:
URL: https://github.com/apache/ignite/pull/8623


   


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



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

Posted by GitBox <gi...@apache.org>.
Sega76 commented on a change in pull request #8623:
URL: https://github.com/apache/ignite/pull/8623#discussion_r559808017



##########
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:
       fixed




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