luchunliang commented on code in PR #12154:
URL: https://github.com/apache/inlong/pull/12154#discussion_r3534803218


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/user/UserServiceImpl.java:
##########
@@ -353,6 +355,24 @@ public void login(UserLoginRequest req) {
         loginLockStatusMap.put(username, userLoginLockStatus);
     }
 
+    @Override
+    public boolean isDefaultUsernameAndPassword(String username) {
+        if (StringUtils.isBlank(username) || !DEFAULT_USER.equals(username)) {
+            return false;
+        }
+        try {
+            UserEntity entity = userMapper.selectByName(username);

Review Comment:
   Querying the DB on every login seems prone to brute-force attacks — maybe 
add a short-TTL cache
   



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to