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 47ba86332 [Bug] Fix: Set a default password for Ldap user (#3955)
47ba86332 is described below

commit 47ba863328e2917bbbd22e51364ffc2cbba050a0
Author: ShawHee <[email protected]>
AuthorDate: Fri Aug 9 15:18:31 2024 +0800

    [Bug] Fix: Set a default password for Ldap user (#3955)
    
    * set default password
    
    * modify constant name
    
    ---------
    
    Co-authored-by: hechao <[email protected]>
---
 .../src/main/java/org/apache/streampark/console/system/entity/User.java | 2 ++
 .../streampark/console/system/security/impl/AuthenticatorImpl.java      | 1 +
 2 files changed, 3 insertions(+)

diff --git 
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/entity/User.java
 
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/entity/User.java
index c34843935..f1a4a237a 100644
--- 
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/entity/User.java
+++ 
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/entity/User.java
@@ -52,6 +52,8 @@ public class User extends BaseEntity {
 
     public static final Integer DEFAULT_PASSWORD_LENGTH = 8;
 
+    public static final String DEFAULT_SECRET = "streampark";
+
     @TableId(type = IdType.AUTO)
     private Long userId;
 
diff --git 
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/AuthenticatorImpl.java
 
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/AuthenticatorImpl.java
index b315014ad..8b61003d5 100644
--- 
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/AuthenticatorImpl.java
+++ 
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/AuthenticatorImpl.java
@@ -119,6 +119,7 @@ public class AuthenticatorImpl implements Authenticator {
         newUser.setUserType(UserTypeEnum.USER);
         newUser.setStatus(User.STATUS_VALID);
         newUser.setSex(User.SEX_UNKNOWN);
+        newUser.setPassword(User.DEFAULT_SECRET);
         usersService.createUser(newUser);
         return newUser;
     }

Reply via email to