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

Presto plugin lookupResource throws NPE if not set service password

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0, 3.0.0
    • Component/s: plugins
    • Labels:
      None

      Description

      In the configuration of Ranger Presto plugin service, password is not a required content. Only when SSL is enabled in Presto, we need to fill in the password. When Presto does not enable SSL, if you fill in the password when configuring the service, the connection will fail and an exception will be thrown.

      java.sql.SQLException: Authentication using username/password requires SSL to be enabled
      

      However, currently in the code, we always put prop.getProperty(HadoopConfigHolder.RANGER_LOGIN_PASSWORD) to prestoProperties, if the password is not set, prop.getProperty(HadoopConfigHolder.RANGER_LOGIN_PASSWORD) will be null. If we put a null value to Properties, this will throw NPE. We need to check whether we have set the password.

        Attachments

        1. 0001-RANGER-2944.patch
          1 kB
          Jiayi Liu

          Issue Links

            Activity

              People

              • Assignee:
                liujiayi771 Jiayi Liu
                Reporter:
                liujiayi771 Jiayi Liu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: