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 <li...@gmail.com> on 2020/08/08 04:39:07 UTC
Review Request 72749: RANGER-2944: Presto plugin lookupResource
throws NPE if not set service password
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72749/
-----------------------------------------------------------
Review request for ranger, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, and Ramesh Mani.
Bugs: RANGER-2944
https://issues.apache.org/jira/browse/RANGER-2944
Repository: ranger
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
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.
Diffs
-----
plugin-presto/src/main/java/org/apache/ranger/services/presto/client/PrestoClient.java 37c2346e0
Diff: https://reviews.apache.org/r/72749/diff/1/
Testing
-------
The lookupResource returns to normal, and the auto-completion function returns to normal when configured in the presto policy.
Thanks,
Jiayi Liu
Re: Review Request 72749: RANGER-2944: Presto plugin lookupResource
throws NPE if not set service password
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72749/#review221508
-----------------------------------------------------------
Ship it!
Ship It!
- Madhan Neethiraj
On Aug. 8, 2020, 4:39 a.m., Jiayi Liu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72749/
> -----------------------------------------------------------
>
> (Updated Aug. 8, 2020, 4:39 a.m.)
>
>
> Review request for ranger, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, and Ramesh Mani.
>
>
> Bugs: RANGER-2944
> https://issues.apache.org/jira/browse/RANGER-2944
>
>
> Repository: ranger
>
>
> 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
> 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.
>
>
> Diffs
> -----
>
> plugin-presto/src/main/java/org/apache/ranger/services/presto/client/PrestoClient.java 37c2346e0
>
>
> Diff: https://reviews.apache.org/r/72749/diff/1/
>
>
> Testing
> -------
>
> The lookupResource returns to normal, and the auto-completion function returns to normal when configured in the presto policy.
>
>
> Thanks,
>
> Jiayi Liu
>
>