You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Abhay Kulkarni <ak...@hortonworks.com> on 2016/06/10 18:04:52 UTC
Review Request 48560: Audit summary statistics (such as event_count,
event_dur_ms) are not persisted when audit destination is RDBMS
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48560/
-----------------------------------------------------------
Review request for ranger and Madhan Neethiraj.
Bugs: RANGER-1022
https://issues.apache.org/jira/browse/RANGER-1022
Repository: ranger
Description
-------
When audit log summary feature is enabled, Ranger audit log record contains repeated number of log events (event_count) and event duration (event_dur_ms) generated during the configured time interval. These fields do not contain correct values when the audit log records are persisted into Relational DBMS.
The root cause was that although event_count and event_dur_ms were initialized correctly in the in-memory Java object, the changes were not persisted. As a result, the database values for these fields always contained their respective default values.
Diffs
-----
agents-audit/src/main/java/org/apache/ranger/audit/entity/AuthzAuditEventDbObj.java 0bef9ea
Diff: https://reviews.apache.org/r/48560/diff/
Testing
-------
Configured Hive component to use Postgres as the audit log destination and to use summary feature. Created access log records for Hive using beeline queries in quick succession. Checked GUI and the xa_access_audit table to ensure that event_count was more than one for the queries which were executed in quick succession (within 5 seconds interval - 5 seconds is the default summary interval).
Thanks,
Abhay Kulkarni
Re: Review Request 48560: Audit summary statistics (such as
event_count,
event_dur_ms) are not persisted when audit destination is RDBMS
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48560/#review137093
-----------------------------------------------------------
Ship it!
Ship It!
- Madhan Neethiraj
On June 10, 2016, 9:16 p.m., Abhay Kulkarni wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48560/
> -----------------------------------------------------------
>
> (Updated June 10, 2016, 9:16 p.m.)
>
>
> Review request for ranger and Madhan Neethiraj.
>
>
> Bugs: RANGER-1022
> https://issues.apache.org/jira/browse/RANGER-1022
>
>
> Repository: ranger
>
>
> Description
> -------
>
> When audit log summary feature is enabled, Ranger audit log record contains repeated number of log events (event_count) and event duration (event_dur_ms) generated during the configured time interval. These fields do not contain correct values when the audit log records are persisted into Relational DBMS.
>
> The root cause was that although event_count and event_dur_ms were initialized correctly in the in-memory Java object, the changes were not persisted. As a result, the database values for these fields always contained their respective default values.
>
>
> Diffs
> -----
>
> agents-audit/src/main/java/org/apache/ranger/audit/entity/AuthzAuditEventDbObj.java 0bef9ea
>
> Diff: https://reviews.apache.org/r/48560/diff/
>
>
> Testing
> -------
>
> Configured Hive component to use Postgres as the audit log destination and to use summary feature. Created access log records for Hive using beeline queries in quick succession. Checked GUI and the xa_access_audit table to ensure that event_count was more than one for the queries which were executed in quick succession (within 5 seconds interval - 5 seconds is the default summary interval).
>
>
> Thanks,
>
> Abhay Kulkarni
>
>
Re: Review Request 48560: Audit summary statistics (such as
event_count,
event_dur_ms) are not persisted when audit destination is RDBMS
Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48560/
-----------------------------------------------------------
(Updated June 10, 2016, 9:16 p.m.)
Review request for ranger and Madhan Neethiraj.
Changes
-------
Added persistence for missing field 'seq_num'
Bugs: RANGER-1022
https://issues.apache.org/jira/browse/RANGER-1022
Repository: ranger
Description
-------
When audit log summary feature is enabled, Ranger audit log record contains repeated number of log events (event_count) and event duration (event_dur_ms) generated during the configured time interval. These fields do not contain correct values when the audit log records are persisted into Relational DBMS.
The root cause was that although event_count and event_dur_ms were initialized correctly in the in-memory Java object, the changes were not persisted. As a result, the database values for these fields always contained their respective default values.
Diffs (updated)
-----
agents-audit/src/main/java/org/apache/ranger/audit/entity/AuthzAuditEventDbObj.java 0bef9ea
Diff: https://reviews.apache.org/r/48560/diff/
Testing
-------
Configured Hive component to use Postgres as the audit log destination and to use summary feature. Created access log records for Hive using beeline queries in quick succession. Checked GUI and the xa_access_audit table to ensure that event_count was more than one for the queries which were executed in quick succession (within 5 seconds interval - 5 seconds is the default summary interval).
Thanks,
Abhay Kulkarni
Re: Review Request 48560: Audit summary statistics (such as
event_count,
event_dur_ms) are not persisted when audit destination is RDBMS
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48560/#review137061
-----------------------------------------------------------
agents-audit/src/main/java/org/apache/ranger/audit/entity/AuthzAuditEventDbObj.java (line 86)
<https://reviews.apache.org/r/48560/#comment202198>
Please add 'seq_num' field as well.
- Madhan Neethiraj
On June 10, 2016, 6:04 p.m., Abhay Kulkarni wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48560/
> -----------------------------------------------------------
>
> (Updated June 10, 2016, 6:04 p.m.)
>
>
> Review request for ranger and Madhan Neethiraj.
>
>
> Bugs: RANGER-1022
> https://issues.apache.org/jira/browse/RANGER-1022
>
>
> Repository: ranger
>
>
> Description
> -------
>
> When audit log summary feature is enabled, Ranger audit log record contains repeated number of log events (event_count) and event duration (event_dur_ms) generated during the configured time interval. These fields do not contain correct values when the audit log records are persisted into Relational DBMS.
>
> The root cause was that although event_count and event_dur_ms were initialized correctly in the in-memory Java object, the changes were not persisted. As a result, the database values for these fields always contained their respective default values.
>
>
> Diffs
> -----
>
> agents-audit/src/main/java/org/apache/ranger/audit/entity/AuthzAuditEventDbObj.java 0bef9ea
>
> Diff: https://reviews.apache.org/r/48560/diff/
>
>
> Testing
> -------
>
> Configured Hive component to use Postgres as the audit log destination and to use summary feature. Created access log records for Hive using beeline queries in quick succession. Checked GUI and the xa_access_audit table to ensure that event_count was more than one for the queries which were executed in quick succession (within 5 seconds interval - 5 seconds is the default summary interval).
>
>
> Thanks,
>
> Abhay Kulkarni
>
>