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

benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git


The following commit(s) were added to refs/heads/dev by this push:
     new ac7c6835c [Improve] Update the password to streampark for admin user 
(#1612)
ac7c6835c is described below

commit ac7c6835cbea15937541b2aa02f281c8237befa1
Author: 1996fanrui <[email protected]>
AuthorDate: Thu Sep 15 23:43:18 2022 +0800

    [Improve] Update the password to streampark for admin user (#1612)
---
 .../src/assembly/script/data/mysql-data.sql        |  2 +-
 .../src/assembly/script/data/pgsql-data.sql        |  2 +-
 .../src/main/resources/db/data-h2.sql              |  2 +-
 .../console/base/util/ShaHashUtilsTest.java        | 33 ++++++++++++++++++++++
 4 files changed, 36 insertions(+), 3 deletions(-)

diff --git 
a/streampark-console/streampark-console-service/src/assembly/script/data/mysql-data.sql
 
b/streampark-console/streampark-console-service/src/assembly/script/data/mysql-data.sql
index 38d7fa179..cf0c532a4 100644
--- 
a/streampark-console/streampark-console-service/src/assembly/script/data/mysql-data.sql
+++ 
b/streampark-console/streampark-console-service/src/assembly/script/data/mysql-data.sql
@@ -180,7 +180,7 @@ insert into `t_setting` values (14, 
'docker.register.namespace', null, 'Namespac
 -- ----------------------------
 -- Records of t_user
 -- ----------------------------
-insert into `t_user` values (100000, 'admin', '', 
'ats6sdxdqf8vsqjtz0utj461wr', 
'829b009a6b9cc8ea486a4abbc38e56529f3c6f4c9c6fcd3604b41b1d6eca1a57', null, 1, 
now(), now(),null,0,null,null );
+insert into `t_user` values (100000, 'admin', '', 
'rh8b1ojwog777yrg0daesf04gk', 
'2513f3748847298ea324dffbf67fe68681dd92315bda830065facd8efe08f54f', null, 1, 
now(), now(),null,0,null,null );
 
 -- ----------------------------
 -- Records of t_user_role
diff --git 
a/streampark-console/streampark-console-service/src/assembly/script/data/pgsql-data.sql
 
b/streampark-console/streampark-console-service/src/assembly/script/data/pgsql-data.sql
index 02274e767..03670a116 100644
--- 
a/streampark-console/streampark-console-service/src/assembly/script/data/pgsql-data.sql
+++ 
b/streampark-console/streampark-console-service/src/assembly/script/data/pgsql-data.sql
@@ -180,7 +180,7 @@ insert into "public"."t_setting" values (14, 
'docker.register.namespace', null,
 -- ----------------------------
 -- Records of t_user
 -- ----------------------------
-insert into "public"."t_user" values (100000, 'admin', '', 
'ats6sdxdqf8vsqjtz0utj461wr', 
'829b009a6b9cc8ea486a4abbc38e56529f3c6f4c9c6fcd3604b41b1d6eca1a57', null, 1, 
now(), now(), null, 0, null, null);
+insert into "public"."t_user" values (100000, 'admin', '', 
'rh8b1ojwog777yrg0daesf04gk', 
'2513f3748847298ea324dffbf67fe68681dd92315bda830065facd8efe08f54f', null, 1, 
now(), now(), null, 0, null, null);
 
 -- ----------------------------
 -- Records of t_user_role
diff --git 
a/streampark-console/streampark-console-service/src/main/resources/db/data-h2.sql
 
b/streampark-console/streampark-console-service/src/main/resources/db/data-h2.sql
index d378c4b58..e69afdc67 100644
--- 
a/streampark-console/streampark-console-service/src/main/resources/db/data-h2.sql
+++ 
b/streampark-console/streampark-console-service/src/main/resources/db/data-h2.sql
@@ -178,7 +178,7 @@ insert into `t_setting` values (14, 
'docker.register.namespace', null, 'Namespac
 -- ----------------------------
 -- Records of t_user
 -- ----------------------------
-insert into `t_user` values (100000, 'admin', '', 
'ats6sdxdqf8vsqjtz0utj461wr', 
'829b009a6b9cc8ea486a4abbc38e56529f3c6f4c9c6fcd3604b41b1d6eca1a57', null, '1', 
now(), now(),null,0,null,null );
+insert into `t_user` values (100000, 'admin', '', 
'rh8b1ojwog777yrg0daesf04gk', 
'2513f3748847298ea324dffbf67fe68681dd92315bda830065facd8efe08f54f', null, '1', 
now(), now(),null,0,null,null );
 
 -- ----------------------------
 -- Records of t_user_role
diff --git 
a/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/base/util/ShaHashUtilsTest.java
 
b/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/base/util/ShaHashUtilsTest.java
new file mode 100644
index 000000000..fca2f46c4
--- /dev/null
+++ 
b/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/base/util/ShaHashUtilsTest.java
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+
+package org.apache.streampark.console.base.util;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+/** Test for {@link ShaHashUtils} */
+public class ShaHashUtilsTest {
+
+    @Test
+    public void testEncrypt() {
+        String randomSalt = "rh8b1ojwog777yrg0daesf04gk";
+        String encryptPassword = ShaHashUtils.encrypt(randomSalt, 
"streampark");
+        
assertEquals("2513f3748847298ea324dffbf67fe68681dd92315bda830065facd8efe08f54f",
 encryptPassword);
+    }
+}

Reply via email to