This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


The following commit(s) were added to refs/heads/develop by this push:
     new aff6d33  DATALAB-2552 fixing ssl-cert issue
     new 60696fd  Merge pull request #1282 from MarianHladun/develop
aff6d33 is described below

commit aff6d3371de3ce80baf8900eb249bff58f6647a1
Author: Marian Hladun <[email protected]>
AuthorDate: Mon Sep 20 11:00:50 2021 +0300

    DATALAB-2552 fixing ssl-cert issue
---
 infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py 
b/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
index c1584c8..5439abc 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
@@ -9,9 +9,9 @@
 # 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
@@ -355,9 +355,11 @@ def start_ss(keyfile, host_string, datalab_conf_dir, 
web_path,
                          -keystore /home/{0}/keys/ssn.keystore.jks -keysize 
2048 -dname "CN=localhost"'.format(
                         os_user, keystore_passwd))
                     datalab.fab.conn.sudo('keytool -exportcert -alias ssn 
-storepass {1} -file /etc/ssl/certs/datalab.crt \
-                         -keystore 
/home/{0}/keys/ssn.keystore.jks'.format(os_user, keystore_passwd))
+                         -keystore /home/{0}/keys/ssn.keystore.jks 
-rfc'.format(os_user, keystore_passwd))
                     datalab.fab.conn.sudo('keytool -importcert -trustcacerts 
-alias ssn -file /etc/ssl/certs/datalab.crt -noprompt \
                          -storepass changeit -keystore 
{1}/lib/security/cacerts'.format(os_user, java_path))
+                    datalab.fab.conn.sudo('openssl req -x509 -nodes -days 3650 
-newkey rsa:2048 -keyout /etc/ssl/certs/datalab.key \
+                        -out /etc/ssl/certs/datalab.crt -subj 
"/C=US/ST=US/L=US/O=datalab/CN={0}"'.format(hostname))
             except:
                 append_result("Unable to generate cert and copy to java 
keystore")
                 sys.exit(1)

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

Reply via email to