[ 
https://issues.apache.org/jira/browse/RANGER-3672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17510992#comment-17510992
 ] 

kirby zhou commented on RANGER-3672:
------------------------------------

You mean that?
{code:java}
if (msg != null && !msg.isEmpty()) {
   if 
(CLIUtil.getMessage("AbstractUserDetailsAuthenticationProvider.badCredentials",request).equalsIgnoreCase(msg))
 {
   vXResponse.setStatusCode(HttpServletResponse.SC_UNAUTHORIZED);
   vXResponse.setMsgDesc("The username or password you entered is incorrect.");
   logger.info("Error Message : " + msg);
   } else if (msg.contains("Could not get JDBC Connection; nested exception is 
java.sql.SQLException: Connections could not be acquired from the underlying 
database!")) {
      vXResponse.setStatusCode(HttpServletResponse.SC_UNAUTHORIZED);
      vXResponse.setMsgDesc("Unable to connect to DB.");
   } else if (msg.contains("Communications link failure")) {
      vXResponse.setStatusCode(HttpServletResponse.SC_UNAUTHORIZED);
      vXResponse.setMsgDesc("Unable to connect to DB.");
   } else if 
(CLIUtil.getMessage("AbstractUserDetailsAuthenticationProvider.disabled",request).equalsIgnoreCase(msg))
 {
      vXResponse.setStatusCode(HttpServletResponse.SC_UNAUTHORIZED);
      vXResponse.setMsgDesc("The username or password you entered is 
disabled.");
   }
}
 {code}
I can not see "The username or password you entered is incorrect." message on 
WebUI.

If you can, plz show me a screenshot.

> Show better error messages during failed logins
> -----------------------------------------------
>
>                 Key: RANGER-3672
>                 URL: https://issues.apache.org/jira/browse/RANGER-3672
>             Project: Ranger
>          Issue Type: Improvement
>          Components: admin
>    Affects Versions: 3.0.0, 2.3.0
>            Reporter: kirby zhou
>            Priority: Critical
>         Attachments: 截屏2022-03-21 12.07.03.jpg
>
>
> When login failure, There are no conspicuous error tips and reasons, just a 
> small red triangle. Should give user a big error prompt box, tell him "The 
> username or password you entered is incorrect..", "The user is disabled or 
> locked for too many attempts. Try again 5 minutes later".
>  
> It seems RANGER-375 did some works before. But I can not see the text message 
> now.
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to