> On March 31, 2021, 4:34 p.m., Madhan Neethiraj wrote: > > security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java > > Lines 5777 (patched) > > <https://reviews.apache.org/r/73253/diff/1/?file=2248228#file2248228line5777> > > > > Instead of instantiating RangerDefaultService, consider the following - > > similar to usage in populateDefaultPolicies(): > > RangerBaseService svc = > > serviceMgr.getRangerServiceByService(service, this);
when we call api for service-def to show default audit filters on the service creation page at that time service is not created. I have changed the code and will be using RangerBaseService svc = serviceMgr.getRangerServiceByService(service, this); at the time of service creation call to fetch the default audit filters. - Dineshkumar ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73253/#review222748 ----------------------------------------------------------- On March 31, 2021, 1:03 p.m., Dineshkumar Yadav wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/73253/ > ----------------------------------------------------------- > > (Updated March 31, 2021, 1:03 p.m.) > > > Review request for ranger, Gautam Borad, Kishor Gollapalliwar, Abhay > Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, and > Velmurugan Periasamy. > > > Repository: ranger > > > Description > ------- > > Default audit filters should be automatically configured when ranger repos > are created. > > We will have default audit filters for each repo in json format at below > location > agents-common/src/main/resources/audit-filters/ > Service creation API : At the time of service creation will fetch default > audit filters if not already present and add it as service config. > Service creation from UI : will fetch the default audit filters show it on > audit filter section of service creation page. > > > Diffs > ----- > > > agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBaseService.java > 65c34e857 > > agents-common/src/main/resources/audit-filters/ranger-plugin-audit-filters-hbase.json > PRE-CREATION > > agents-common/src/main/resources/audit-filters/ranger-plugin-audit-filters-hdfs.json > PRE-CREATION > > agents-common/src/main/resources/audit-filters/ranger-plugin-audit-filters-hive.json > PRE-CREATION > > agents-common/src/main/resources/audit-filters/ranger-plugin-audit-filters-kafka.json > PRE-CREATION > security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql > 7179dc998 > security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql > 40917cdf4 > security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql > ba9eb0157 > > security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql > 371846f1e > security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql > 90004ec77 > security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java > a7871eda8 > > security-admin/src/main/java/org/apache/ranger/patch/PatchForDefaultAuidtFilters_J10047.java > PRE-CREATION > security-admin/src/main/webapp/scripts/views/service/ServiceForm.js > 668fa794b > > > Diff: https://reviews.apache.org/r/73253/diff/1/ > > > Testing > ------- > > Testing Done > Default audit filter is getting added when service is created. > > > Thanks, > > Dineshkumar Yadav > >
