You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org> on 2017/02/09 11:39:41 UTC

[jira] [Resolved] (RANGER-1363) BadCredentialsException when login

     [ https://issues.apache.org/jira/browse/RANGER-1363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh resolved RANGER-1363.
-----------------------------------------
    Resolution: Fixed

> BadCredentialsException when login
> ----------------------------------
>
>                 Key: RANGER-1363
>                 URL: https://issues.apache.org/jira/browse/RANGER-1363
>             Project: Ranger
>          Issue Type: Bug
>          Components: admin
>    Affects Versions: 0.7.0
>            Reporter: Qiang Zhang
>            Assignee: Qiang Zhang
>              Labels: patch
>             Fix For: 0.7.0
>
>         Attachments: 0001-RANGER-1363-BadCredentialsException-when-login.patch
>
>
> It will always print BadCredentialsException in ranger_admin.log when log to the system. I checked the codes and found the reason:
> First we set the encoder as 'SHA256'.
> String encoder="SHA256";
> try {
> 	authentication = getJDBCAuthentication(authentication,encoder);
> } catch (Exception e) {
>         logger.info("JDBC Authentication failure: ", e);
> } 
> Then we set the encoder as 'MD5'.
> if (authentication !=null && authentication.isAuthenticated()) {
> 	return authentication;
> }
> if (authentication != null && !authentication.isAuthenticated()) {
> 	encoder="MD5";
>         ......
>         try {
> 	        authentication = getJDBCAuthentication(authentication,encoder);
>         } catch (Exception e) {
>                 logger.info("JDBC Authentication failure: ", e);
>         } 
> ......
> }
> Since our encoder is 'MD5', we can log to the system successfully but still can see the error log for 'SHA256'. I have do some changes for the codes and avoid the BadCredentialsException.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)