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 05:59:56 UTC
Review Request 72750: RANGER-2945: Need to check if
RANGER_LOGIN_PASSWORD exists in HadoopConfigHolder
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72750/
-----------------------------------------------------------
Review request for ranger, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, and Ramesh Mani.
Bugs: RANGER-2945
https://issues.apache.org/jira/browse/RANGER-2945
Repository: ranger
Description
-------
Since Presto service allows not to set password, when constructing `HadoopConfigHolder`, we need to check whether `RANGER_LOGIN_PASSWORD` is set. If it is not set, we need to set it to null in `connectionProperties` in order to make the password in `dataSource2HadoopConfigHolder` be updated. Otherwise, when we set the password in the Presto service, the static variable `dataSource2HadoopConfigHolder` will store the password. If we change the password in the Presto service to empty, if we do not check the `RANGER_LOGIN_PASSWORD`, the old password stored in `dataSource2HadoopConfigHolder` will never be updated, causing the presto client connection to fail.
Diffs
-----
agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopConfigHolder.java a065a8db7
Diff: https://reviews.apache.org/r/72750/diff/1/
Testing
-------
First, set the password in the presto service, and then set the password to empty, the password stored in dataSource2HadoopConfigHolder can be successfully updated to null.
Thanks,
Jiayi Liu
Re: Review Request 72750: RANGER-2945: Need to check if
RANGER_LOGIN_PASSWORD exists in HadoopConfigHolder
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72750/#review221513
-----------------------------------------------------------
Ship it!
Ship It!
- Madhan Neethiraj
On Aug. 9, 2020, 2:01 p.m., Jiayi Liu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72750/
> -----------------------------------------------------------
>
> (Updated Aug. 9, 2020, 2:01 p.m.)
>
>
> Review request for ranger, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, and Ramesh Mani.
>
>
> Bugs: RANGER-2945
> https://issues.apache.org/jira/browse/RANGER-2945
>
>
> Repository: ranger
>
>
> Description
> -------
>
> Since Presto service allows not to set password, when constructing `HadoopConfigHolder`, we need to check whether `RANGER_LOGIN_PASSWORD` is set. If it is not set, we need to set it to null in `connectionProperties` in order to make the password in `dataSource2HadoopConfigHolder` be updated. Otherwise, when we set the password in the Presto service, the static variable `dataSource2HadoopConfigHolder` will store the password. If we change the password in the Presto service to empty, if we do not check the `RANGER_LOGIN_PASSWORD`, the old password stored in `dataSource2HadoopConfigHolder` will never be updated, causing the presto client connection to fail.
>
>
> Diffs
> -----
>
> plugin-presto/src/main/java/org/apache/ranger/services/presto/RangerServicePresto.java f41b2c844
>
>
> Diff: https://reviews.apache.org/r/72750/diff/2/
>
>
> Testing
> -------
>
> First, set the password in the presto service, and then set the password to empty, the password stored in dataSource2HadoopConfigHolder can be successfully updated to null.
>
>
> Thanks,
>
> Jiayi Liu
>
>
Re: Review Request 72750: RANGER-2945: Need to check if
RANGER_LOGIN_PASSWORD exists in HadoopConfigHolder
Posted by Jiayi Liu <li...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72750/
-----------------------------------------------------------
(Updated 八月 9, 2020, 2:01 p.m.)
Review request for ranger, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, and Ramesh Mani.
Bugs: RANGER-2945
https://issues.apache.org/jira/browse/RANGER-2945
Repository: ranger
Description
-------
Since Presto service allows not to set password, when constructing `HadoopConfigHolder`, we need to check whether `RANGER_LOGIN_PASSWORD` is set. If it is not set, we need to set it to null in `connectionProperties` in order to make the password in `dataSource2HadoopConfigHolder` be updated. Otherwise, when we set the password in the Presto service, the static variable `dataSource2HadoopConfigHolder` will store the password. If we change the password in the Presto service to empty, if we do not check the `RANGER_LOGIN_PASSWORD`, the old password stored in `dataSource2HadoopConfigHolder` will never be updated, causing the presto client connection to fail.
Diffs (updated)
-----
plugin-presto/src/main/java/org/apache/ranger/services/presto/RangerServicePresto.java f41b2c844
Diff: https://reviews.apache.org/r/72750/diff/2/
Changes: https://reviews.apache.org/r/72750/diff/1-2/
Testing
-------
First, set the password in the presto service, and then set the password to empty, the password stored in dataSource2HadoopConfigHolder can be successfully updated to null.
Thanks,
Jiayi Liu
Re: Review Request 72750: RANGER-2945: Need to check if
RANGER_LOGIN_PASSWORD exists in HadoopConfigHolder
Posted by Jiayi Liu <li...@gmail.com>.
> On 八月 8, 2020, 5:29 p.m., Madhan Neethiraj wrote:
> > agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopConfigHolder.java
> > Lines 150 (patched)
> > <https://reviews.apache.org/r/72750/diff/1/?file=2237518#file2237518line150>
> >
> > HadoopConfigHolder is used by BaseClient, which is common to many services. Can the issue be addressed by updating PrestoClient?
Yes, I can put this modification in RangerServicePresto, in `validateConfig` and `lookupResource`, if the password is not included in the config, then set the password to null.
- Jiayi
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72750/#review221510
-----------------------------------------------------------
On 八月 9, 2020, 2:01 p.m., Jiayi Liu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72750/
> -----------------------------------------------------------
>
> (Updated 八月 9, 2020, 2:01 p.m.)
>
>
> Review request for ranger, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, and Ramesh Mani.
>
>
> Bugs: RANGER-2945
> https://issues.apache.org/jira/browse/RANGER-2945
>
>
> Repository: ranger
>
>
> Description
> -------
>
> Since Presto service allows not to set password, when constructing `HadoopConfigHolder`, we need to check whether `RANGER_LOGIN_PASSWORD` is set. If it is not set, we need to set it to null in `connectionProperties` in order to make the password in `dataSource2HadoopConfigHolder` be updated. Otherwise, when we set the password in the Presto service, the static variable `dataSource2HadoopConfigHolder` will store the password. If we change the password in the Presto service to empty, if we do not check the `RANGER_LOGIN_PASSWORD`, the old password stored in `dataSource2HadoopConfigHolder` will never be updated, causing the presto client connection to fail.
>
>
> Diffs
> -----
>
> plugin-presto/src/main/java/org/apache/ranger/services/presto/RangerServicePresto.java f41b2c844
>
>
> Diff: https://reviews.apache.org/r/72750/diff/2/
>
>
> Testing
> -------
>
> First, set the password in the presto service, and then set the password to empty, the password stored in dataSource2HadoopConfigHolder can be successfully updated to null.
>
>
> Thanks,
>
> Jiayi Liu
>
>
Re: Review Request 72750: RANGER-2945: Need to check if
RANGER_LOGIN_PASSWORD exists in HadoopConfigHolder
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72750/#review221510
-----------------------------------------------------------
agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopConfigHolder.java
Lines 150 (patched)
<https://reviews.apache.org/r/72750/#comment310551>
HadoopConfigHolder is used by BaseClient, which is common to many services. Can the issue be addressed by updating PrestoClient?
- Madhan Neethiraj
On Aug. 8, 2020, 5:59 a.m., Jiayi Liu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72750/
> -----------------------------------------------------------
>
> (Updated Aug. 8, 2020, 5:59 a.m.)
>
>
> Review request for ranger, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, and Ramesh Mani.
>
>
> Bugs: RANGER-2945
> https://issues.apache.org/jira/browse/RANGER-2945
>
>
> Repository: ranger
>
>
> Description
> -------
>
> Since Presto service allows not to set password, when constructing `HadoopConfigHolder`, we need to check whether `RANGER_LOGIN_PASSWORD` is set. If it is not set, we need to set it to null in `connectionProperties` in order to make the password in `dataSource2HadoopConfigHolder` be updated. Otherwise, when we set the password in the Presto service, the static variable `dataSource2HadoopConfigHolder` will store the password. If we change the password in the Presto service to empty, if we do not check the `RANGER_LOGIN_PASSWORD`, the old password stored in `dataSource2HadoopConfigHolder` will never be updated, causing the presto client connection to fail.
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopConfigHolder.java a065a8db7
>
>
> Diff: https://reviews.apache.org/r/72750/diff/1/
>
>
> Testing
> -------
>
> First, set the password in the presto service, and then set the password to empty, the password stored in dataSource2HadoopConfigHolder can be successfully updated to null.
>
>
> Thanks,
>
> Jiayi Liu
>
>