> On Nov. 14, 2024, 4:44 p.m., Madhan Neethiraj wrote: > > security-admin/src/main/java/org/apache/ranger/common/RangerServicePoliciesCache.java > > Lines 551 (patched) > > <https://reviews.apache.org/r/75271/diff/1/?file=2294568#file2294568line551> > > > > Policies in RangerServicePoliciesCache are provided to plugins. Pruning > > of unused attributes was done to reduce the payload, especially where there > > are a large number of policies. I would suggest to not update the cache for > > the reported issue. > > > > If a list of APIs that require pruned attributes, consider updating > > these APIs to directly read from the database instead of from cache.
Got it. Made the changes accordingly. Please review the new iteration. Also, made pruning unused policy attributes while storing policies in cache at all times, previously pruning was missing during deltas/policy updates. And as well, currently retrieving and setting policy meta time data from db just while returning policies if the flag is set for the api. - Guru Thejus ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/75271/#review227055 ----------------------------------------------------------- On Nov. 19, 2024, 7:01 a.m., Guru Thejus Arveti wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/75271/ > ----------------------------------------------------------- > > (Updated Nov. 19, 2024, 7:01 a.m.) > > > Review request for ranger, Madhan Neethiraj and Pradeep Agrawal. > > > Bugs: RANGER-4996 > https://issues.apache.org/jira/browse/RANGER-4996 > > > Repository: ranger > > > Description > ------- > > RANGER-4996: Made meta attributes fields in policy rest api response > configurable for retrieval > > > Diffs > ----- > > > agents-common/src/main/java/org/apache/ranger/plugin/store/ServiceStore.java > 97072391e > security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java > 0dee87734 > > security-admin/src/main/java/org/apache/ranger/common/RangerServicePoliciesCache.java > c8d1e5d08 > security-admin/src/main/java/org/apache/ranger/rest/PublicAPIsv2.java > b93b63f85 > security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java > ce3a95766 > > security-admin/src/main/java/org/apache/ranger/service/RangerBaseModelService.java > 26f76578e > security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml > 1af339010 > > > Diff: https://reviews.apache.org/r/75271/diff/2/ > > > Testing > ------- > > Tested the /service/public/v2/api/policy rest api from swagger and as well as > from postman and verified that createTime, updateTime, createdBy, updatedBy > fields are being retrieved in the response when the > ranger.admin.api.include.policy.meta.attributes flag is set > > > Thanks, > > Guru Thejus Arveti > >