You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Kirby Zhou <ki...@gmail.com> on 2023/02/23 08:44:53 UTC

Review Request 74317: Ranger-4106: Fix NullPtr Exception when download roles is not allowed to user.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74317/
-----------------------------------------------------------

Review request for ranger, Dhaval Shah, Dineshkumar Yadav, Gautam Borad, Jayendra Parab, Kishor Gollapalliwar, Abhay Kulkarni, Mateen Mansoori, Mehul Parikh, Pradeep Agrawal, VaradreawiZTV VaradreawiZTV, Vishal Suvagia, and Velmurugan Periasamy.


Bugs: RANGER-4106
    https://issues.apache.org/jira/browse/RANGER-4106


Repository: ranger


Description
-------

```
Feb 23, 2023 7:17:21 AM com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException
SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
java.lang.NullPointerException
        at org.apache.ranger.biz.AssetMgr.doCreateOrUpdateXXPluginInfo(AssetMgr.java:831)
        at org.apache.ranger.biz.AssetMgr.createOrUpdatePluginInfo(AssetMgr.java:791)
        at org.apache.ranger.biz.AssetMgr.createPluginInfo(AssetMgr.java:728)
        at org.apache.ranger.rest.RoleREST.getSecureRangerRolesIfUpdated(RoleREST.java:874)
        at org.apache.ranger.rest.RoleREST$$FastClassBySpringCGLIB$$d1176b81.invoke(<generated>)
```

doCreateOrUpdateXXPluginInfo() in AssertMgr.java checks `getRoleDownloadTime()` to protect `getRoleDownloadedVersion()`, And getSecureRangerRolesIfUpdated() in RoleRest.java did not set downloadedVersion when isAllowed = false.


Diffs
-----

  security-admin/src/main/java/org/apache/ranger/biz/AssetMgr.java 84f5ab1684871e1524d877181fcc51e536054f41 


Diff: https://reviews.apache.org/r/74317/diff/1/


Testing
-------

done


Thanks,

Kirby Zhou


Re: Review Request 74317: Ranger-4106: Fix NullPtr Exception when download roles is not allowed to user.

Posted by bhavik patel <bh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74317/#review225242
-----------------------------------------------------------


Ship it!




Ship It!

- bhavik patel


On Feb. 23, 2023, 8:44 a.m., Kirby Zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74317/
> -----------------------------------------------------------
> 
> (Updated Feb. 23, 2023, 8:44 a.m.)
> 
> 
> Review request for ranger, bhavik patel, Dhaval Shah, Dineshkumar Yadav, Gautam Borad, Jayendra Parab, Kishor Gollapalliwar, Abhay Kulkarni, Mateen Mansoori, madhan, Mehul Parikh, Pradeep Agrawal, VaradreawiZTV VaradreawiZTV, Vishal Suvagia, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4106
>     https://issues.apache.org/jira/browse/RANGER-4106
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> ```
> Feb 23, 2023 7:17:21 AM com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException
> SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
> java.lang.NullPointerException
>         at org.apache.ranger.biz.AssetMgr.doCreateOrUpdateXXPluginInfo(AssetMgr.java:831)
>         at org.apache.ranger.biz.AssetMgr.createOrUpdatePluginInfo(AssetMgr.java:791)
>         at org.apache.ranger.biz.AssetMgr.createPluginInfo(AssetMgr.java:728)
>         at org.apache.ranger.rest.RoleREST.getSecureRangerRolesIfUpdated(RoleREST.java:874)
>         at org.apache.ranger.rest.RoleREST$$FastClassBySpringCGLIB$$d1176b81.invoke(<generated>)
> ```
> 
> doCreateOrUpdateXXPluginInfo() in AssertMgr.java checks `getRoleDownloadTime()` to protect `getRoleDownloadedVersion()`, And getSecureRangerRolesIfUpdated() in RoleRest.java did not set downloadedVersion when isAllowed = false.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/biz/AssetMgr.java 84f5ab1684871e1524d877181fcc51e536054f41 
> 
> 
> Diff: https://reviews.apache.org/r/74317/diff/2/
> 
> 
> Testing
> -------
> 
> done
> 
> 
> Thanks,
> 
> Kirby Zhou
> 
>