Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-1363

BadCredentialsException when login

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.7.0
    • 0.7.0
    • admin

    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.

      Attachments

        Activity

          People

            zhangqiang2 Qiang Zhang
            zhangqiang2 Qiang Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: