> On Dec. 18, 2018, 7:52 p.m., Na Li wrote: > > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/DefaultSentryValidator.java > > Lines 67 (patched) > > <https://reviews.apache.org/r/69586/diff/1/?file=2114579#file2114579line71> > > > > If the object is not a table, then this would be wrong. Is there a type > > field to check it is indeed a table?
Good catch. I don't think is necessary to check if it is a table or not because the code will never call the filterTable with an object that is not a table, but it would be good to check just in case. I found that getType() returns the type of the object. > On Dec. 18, 2018, 7:52 p.m., Na Li wrote: > > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetaStoreFilterHook.java > > Lines 115 (patched) > > <https://reviews.apache.org/r/69586/diff/1/?file=2114583#file2114583line120> > > > > should we keep the username case? see > > https://issues.apache.org/jira/browse/SENTRY-2432 True. - Sergio ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/69586/#review211412 ----------------------------------------------------------- On Dec. 18, 2018, 7:28 p.m., Sergio Pena wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/69586/ > ----------------------------------------------------------- > > (Updated Dec. 18, 2018, 7:28 p.m.) > > > Review request for sentry, Arjun Mishra, kalyan kumar kalvagadda, and Na Li. > > > Bugs: sentry-2481 > https://issues.apache.org/jira/browse/sentry-2481 > > > Repository: sentry > > > Description > ------- > > Re-use the SentryMetaStoreFilterHook to support HMS server-side object > filtering. The SentryMetaStoreFilterHook class was deprecated and not used in > the HMS client anymore (replaced by the calls to DefaultSentryValidator). Due > to code duplication between SentryMetaStoreFilterHook and > DefaultSentryValidator, a new class MetaStoreAuthzObjectFilter is created > that accepts different types of objects to be filtered (unit tests are added > to verify the cases). > > > Diffs > ----- > > .gitignore 6ce3a6c11f6caf743fb00271af2cb4d33a18aa5d > pom.xml f28be5afb7c9673c0b111325d7728381f8c89d2f > > sentry-binding/sentry-binding-hive-common/src/main/java/org/apache/sentry/binding/hive/authz/HiveAuthzBinding.java > 520de52ac3a41d0b4c01b1bdf60944fd44add5e7 > > sentry-binding/sentry-binding-hive-common/src/main/java/org/apache/sentry/binding/hive/authz/HiveAuthzPrivileges.java > c37ce646da97afb2e5c033fb3acf43190a4fae80 > > sentry-binding/sentry-binding-hive-conf/src/main/java/org/apache/sentry/binding/hive/conf/HiveAuthzConf.java > cd4ae4a8c80b34769c65d4b8b86b2d6ecc78b075 > sentry-binding/sentry-binding-hive/pom.xml > b74516d70eaf873ef46914e2fbcfe08753bc1be4 > > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/DefaultSentryValidator.java > 38ce2db374ee4f46190544479bc0713de2fce420 > > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/MetastoreAuthzObjectFilter.java > PRE-CREATION > > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/HiveAuthzBindingFactory.java > PRE-CREATION > > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/MetastoreAuthzBindingBase.java > 8ad9e50350a1a45ebdde9d8acb7f039b14a13f41 > > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetaStoreFilterHook.java > 5ecc87f9be36d6096e30de1f3c8697cd2d4da091 > > sentry-binding/sentry-binding-hive/src/test/java/org/apache/sentry/binding/hive/authz/TestMetastoreAuthzObjectFilter.java > PRE-CREATION > > sentry-binding/sentry-binding-hive/src/test/java/org/apache/sentry/binding/metastore/TestSentryMetaStoreFilterHook.java > PRE-CREATION > > > Diff: https://reviews.apache.org/r/69586/diff/1/ > > > Testing > ------- > > Added unit tests for the SentryMetaStoreFilterHook. > > > Thanks, > > Sergio Pena > >