iaorekhov-1980 commented on code in PR #61440:
URL: https://github.com/apache/doris/pull/61440#discussion_r3691628039
##########
fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java:
##########
@@ -237,8 +237,14 @@ public void checkPlainPassword(String remoteUser, String
remoteHost, String remo
// Check the LDAP password when the user exists in the LDAP service.
if (ldapManager.doesUserExist(remoteUser)) {
if (!ldapManager.checkUserPasswd(remoteUser, remotePasswd,
remoteHost, currentUser)) {
- throw new
AuthenticationException(ErrorCode.ERR_ACCESS_DENIED_ERROR, remoteUser + "@" +
remoteHost,
+ if (Strings.isNullOrEmpty(remotePasswd)) {
+ // extra check for login with empty LDAP password was
added in checkUserPasswd
+ throw new
AuthenticationException(ErrorCode.ERR_EMPTY_PASSWORD, remoteUser + "@" +
remoteHost);
+ } else {
+ throw new
AuthenticationException(ErrorCode.ERR_ACCESS_DENIED_ERROR,
+ remoteUser + "@" + remoteHost + " via LDAP",
Review Comment:
Hello!
Thanks for notice.
You are right and I've returned back to generic access-denied response and
kept specific message about actual root cause with empty LDAP password only in
debug logs.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]