You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Jiayi Liu (Jira)" <ji...@apache.org> on 2020/08/08 04:25:00 UTC

[jira] [Created] (RANGER-2944) Presto plugin lookupResource throws NPE if not set service password

Jiayi Liu created RANGER-2944:
---------------------------------

             Summary: Presto plugin lookupResource throws NPE if not set service password
                 Key: RANGER-2944
                 URL: https://issues.apache.org/jira/browse/RANGER-2944
             Project: Ranger
          Issue Type: Bug
          Components: plugins
            Reporter: Jiayi Liu


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.

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

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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)