----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/72061/#review220277 -----------------------------------------------------------
ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControl.java Line 106 (original), 106 (patched) <https://reviews.apache.org/r/72061/#comment308612> deactivatePluginClassLoader() should be called before the shim method returns - as shown below: try { activatePluginClassLoader(); return systemAccessControlImpl.filterCatalogs(identity, catalogs); } finally { deactivatePluginClassLoader(); } Please review and update other methods as well (#167,#229). - Madhan Neethiraj On Jan. 30, 2020, 12:45 p.m., Jiayi Liu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/72061/ > ----------------------------------------------------------- > > (Updated Jan. 30, 2020, 12:45 p.m.) > > > Review request for ranger, Don Bosco Durai, Colm O hEigeartaigh, Abhay > Kulkarni, Madhan Neethiraj, Mehul Parikh, Nitin Galave, pengjianhua, Pradeep > Agrawal, Ramesh Mani, Selvamohan Neethiraj, Velmurugan Periasamy, and Zsombor > Gegesy. > > > Bugs: RANGER-2716 > https://issues.apache.org/jira/browse/RANGER-2716 > > > Repository: ranger > > > Description > ------- > > Presto plugin returns the input set of catalogs/schemas/tables directly at > present. However, this causes a problem, that is, when the user uses show > catalogs/schemas/tables, all catalogs/schemas/tables are displayed, even > though the user does not have the permissions to display all > catalogs/schemas/tables. > > We need to fix the filterCatalogs/Schemas/Tables functions to filter > catalogs/schemas/tables, so that the user can only see the > catalogs/schemas/tables in which the user has SELECT permission. > > > Diffs > ----- > > > plugin-presto/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControl.java > 3ab63f590 > > ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControl.java > e89f646e1 > > > Diff: https://reviews.apache.org/r/72061/diff/1/ > > > Testing > ------- > > show catalogs/schemas/tables only display the catalogs/schemas/tables in > which the user has SELECT permission. > > > Thanks, > > Jiayi Liu > >