You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Cai-Yao (via GitHub)" <gi...@apache.org> on 2023/04/19 08:07:20 UTC

[GitHub] [doris] Cai-Yao commented on a diff in pull request #18816: [Enchancement](auth) Forbid to login doris from 127.0.0.1 without password

Cai-Yao commented on code in PR #18816:
URL: https://github.com/apache/doris/pull/18816#discussion_r1170974285


##########
fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java:
##########
@@ -171,8 +172,8 @@ public void mergeRolesNoCheckName(List<String> roles, Role savedRole) throws Ddl
      */
     public void checkPassword(String remoteUser, String remoteHost, byte[] remotePasswd, byte[] randomString,
             List<UserIdentity> currentUser) throws AuthenticationException {
-        if ((remoteUser.equals(ROOT_USER) || remoteUser.equals(ADMIN_USER)) && remoteHost.equals("127.0.0.1")) {
-            // root and admin user is allowed to login from 127.0.0.1, in case user forget password.
+        if ((remoteUser.equals(ROOT_USER) || remoteUser.equals(ADMIN_USER)) && Config.skip_auth_check) {

Review Comment:
   OK, I will modify this.



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org