> On July 8, 2016, 6:46 a.m., Pradeep Agrawal wrote:
> >
Thanks for your comments.
Do you mean it should be:
if(!("").equals(entry.getValue())&&(entry.getValue()!=null)){}
>From my test, if we add a service config with empty value in admin UI, the
>value will be passed as "".
And this empty value should not be recorded in trx_log.
- Dongying
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49622/#review141258
-----------------------------------------------------------
On July 5, 2016, 8:48 a.m., Dongying Jiao wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49622/
> -----------------------------------------------------------
>
> (Updated July 5, 2016, 8:48 a.m.)
>
>
> Review request for ranger.
>
>
> Bugs: RANGER-1067
> https://issues.apache.org/jira/browse/RANGER-1067
>
>
> Repository: ranger
>
>
> Description
> -------
>
> Problem Statement : Currently when adding configuration in a service repo,
> there are some fields that are not changed recorded in the admin audit log.
> The old value and new value are all null. When deleting the configuration,
> the audit log is recorded not correctly. For example, the configuration name
> I deleted is "A1" with value "B", but in audit log, the value of
> configuration name "A2" is changed from "B" to "".
>
> Proposed Solution : It is because sometimes the request passed from restapi
> contains some configuration with null value, these configurations will not be
> saved in x_service_config_map table, so it should not be recorded in
> x_trx_log table either. Add a check before add new config to x_trx_log.
>
>
> Diffs
> -----
>
>
> security-admin/src/main/java/org/apache/ranger/service/RangerServiceService.java
> 82dad25
>
> Diff: https://reviews.apache.org/r/49622/diff/
>
>
> Testing
> -------
>
> Steps Performed (with patch) :
> 1. After mvn Build; replace RangerServiceService.class under
> /ranger-admin/ews/webapp/WEB-INF/classes/org/apache/ranger/service on a live
> cluster, then restart ranger admin service.
>
> Expected Behavior :
> 1. When adding a configuration in a service repo, only the added
> configuration should be recorded in admin audit log.
> 2. When deleting the configuration, the configuration name and value change
> should be recorded correctly in admin audit log.
> 3.
> Actual Behavior :
> 1. When adding a configuration in a service repo, only the added
> configuration should be recorded in admin audit log.
> 2. When deleting the configuration, the configuration name and value change
> should be recorded correctly in admin audit log.
>
>
> Thanks,
>
> Dongying Jiao
>
>