> On Feb. 24, 2025, 4:04 p.m., Madhan Neethiraj wrote:
> > security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java
> > Lines 4647 (patched)
> > <https://reviews.apache.org/r/75366/diff/1/?file=2297739#file2297739line4647>
> >
> > If ranger.plugin.audit.filters is not included in config when a service
> > is created, Ranger admin will use the default value of the configuration
> > specified in corresponding service-def.
> >
> > Setting to empty value here will result in the default value not be
> > used. This would cause regression. Please verify.
>
> Madhan Neethiraj wrote:
> If no audit filters are to be created while creating a service,
> irrespective of the default value specified in the service-def,
> ranger.plugin.audit.filters config should be set to "[]" - as shown below.
>
>
> {
> "name": "test_hive",
> "type": "hive",
> "configs": {
> "username": "hive",
> "password": "password",
> "jdbc.driverClassName": "org.apache.hive.jdbc.HiveDriver",
> "jdbc.url": "jdbc:hive2://ranger-hive:10000",
> "ranger.plugin.audit.filters": "[]"
> }
> }
There are two scenarios:
1. If the request does not include the "ranger.plugin.audit.filters"
configuration, the default value from the service definition is used to create
the service.
2. If the request explicitly sets "ranger.plugin.audit.filters" to an empty
value (""), we preserve this empty value. This fix specifically addresses this
scenario. which is a corner case where we preserve user-provided configurations.
Please let us know if the empty value should not be preserved and if the
default configuration should be applied instead.
- Dineshkumar
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75366/#review227268
-----------------------------------------------------------
On Feb. 24, 2025, 11:01 a.m., Dineshkumar Yadav wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/75366/
> -----------------------------------------------------------
>
> (Updated Feb. 24, 2025, 11:01 a.m.)
>
>
> Review request for ranger, Kishor Gollapalliwar, Madhan Neethiraj, Mehul
> Parikh, Pradeep Agrawal, and Vyom Tiwari.
>
>
> Bugs: RANGER-5152
> https://issues.apache.org/jira/browse/RANGER-5152
>
>
> Repository: ranger
>
>
> Description
> -------
>
> Service Create API adds the default "ranger.plugin.audit.filters"
> configuration despite a provided blank value.
>
>
> Diffs
> -----
>
> security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java
> f7c521111
>
>
> Diff: https://reviews.apache.org/r/75366/diff/1/
>
>
> Testing
> -------
>
> Manual testing Done using below service create API
>
> /service/public/v2/api/service/
>
>
> Thanks,
>
> Dineshkumar Yadav
>
>