-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56432/
-----------------------------------------------------------
(Updated 二月 9, 2017, 11:31 a.m.)
Review request for ranger, Don Bosco Durai and Colm O hEigeartaigh.
Changes
-------
Yes, you're right, it's better for us to use the original logic. Please help to
review this patch, thanks.
Bugs: RANGER-1363
https://issues.apache.org/jira/browse/RANGER-1363
Repository: ranger
Description
-------
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.
Diffs (updated)
-----
security-admin/src/main/java/org/apache/ranger/security/handler/RangerAuthenticationProvider.java
843af2d
Diff: https://reviews.apache.org/r/56432/diff/
Testing
-------
git am --signoff < 0001-RANGER-1363-BadCredentialsException-when-login.patch
Applying: RANGER-1363:BadCredentialsException when login
Thanks,
Qiang Zhang