You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Gautam Borad <gb...@gmail.com> on 2016/01/12 14:36:16 UTC

Review Request 42192: RANGER-810 : Audit page should show most recent audit log at the top

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42192/
-----------------------------------------------------------

Review request for ranger, Alok Lal, Don Bosco Durai, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.


Bugs: RANGER-810
    https://issues.apache.org/jira/browse/RANGER-810


Repository: ranger


Description
-------

Problem Statement : 
On selecting the Audit tab, the audit logs are listed in ascending order of audit event time - showing the oldest log at the top. 

As part of changes added in RANGER-733, we removed using custom sort orders and started taking only the default sort orders defined in super classes (in XAccessAuditService.java). Because of which, sort order which was getting set in XAccessAuditService.java to eventTime is now set to default field (id), and from UI side, we were not fetching the collection by setting any sort order. Because of this, we are seeing audit logs ordered by Id not eventTime. 


Proposed Solution :
Earlier we did not send sortBy parameter in request while fetching the collection. Now, we are sending the sortBy=eventTime  parameter with request for fetching the Audit Acess collection.


Diffs
-----

  security-admin/src/main/webapp/scripts/controllers/Controller.js 7b9cc39 

Diff: https://reviews.apache.org/r/42192/diff/


Testing
-------

Tested for :

1) Sorting of Audit Access Logs on first load 
2) Default sort order, when we click on Refresh icon
3) Default sort order, after switching the Tab

Observation : 

It retained the sortBy parameter and shows the latest logs on top.


Thanks,

Gautam Borad


Re: Review Request 42192: RANGER-810 : Audit page should show most recent audit log at the top

Posted by Don Bosco Durai <bo...@apache.org>.

> On Jan. 12, 2016, 9:01 p.m., Don Bosco Durai wrote:
> > security-admin/src/main/webapp/scripts/controllers/Controller.js, line 97
> > <https://reviews.apache.org/r/42192/diff/1/?file=1194365#file1194365line97>
> >
> >     In Solr, we also have seq_num. I feel, when it is Solr Audit repository, we should add also to the sort
> 
> Gautam Borad wrote:
>     @Bosco, 
>     There will be two cases here : 
>     
>     1. Do we want multiple sort orders (eventTime and seq_num) ? Currently only single sort order is supported.
>     2. Do we want to sort by seq_num if REST call has sortBy=eventTime for Audit to Solr cases? This will require server side changes also.
>     
>     If required, we can create a new Jira and discuss this there.

This column need not be published on the UI side, but on the server side, if we see eventTime, then we should add seq_num also (only for Solr). Otherwise, the order in the UI might not be predictable.

Can we create a JIRA to track it?

Thanks


- Don Bosco


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42192/#review114065
-----------------------------------------------------------


On Jan. 12, 2016, 1:36 p.m., Gautam Borad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42192/
> -----------------------------------------------------------
> 
> (Updated Jan. 12, 2016, 1:36 p.m.)
> 
> 
> Review request for ranger, Alok Lal, Don Bosco Durai, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-810
>     https://issues.apache.org/jira/browse/RANGER-810
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Problem Statement : 
> On selecting the Audit tab, the audit logs are listed in ascending order of audit event time - showing the oldest log at the top. 
> 
> As part of changes added in RANGER-733, we removed using custom sort orders and started taking only the default sort orders defined in super classes (in XAccessAuditService.java). Because of which, sort order which was getting set in XAccessAuditService.java to eventTime is now set to default field (id), and from UI side, we were not fetching the collection by setting any sort order. Because of this, we are seeing audit logs ordered by Id not eventTime. 
> 
> 
> Proposed Solution :
> Earlier we did not send sortBy parameter in request while fetching the collection. Now, we are sending the sortBy=eventTime  parameter with request for fetching the Audit Acess collection.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/webapp/scripts/controllers/Controller.js 7b9cc39 
> 
> Diff: https://reviews.apache.org/r/42192/diff/
> 
> 
> Testing
> -------
> 
> Tested for :
> 
> 1) Sorting of Audit Access Logs on first load 
> 2) Default sort order, when we click on Refresh icon
> 3) Default sort order, after switching the Tab
> 
> Observation : 
> 
> It retained the sortBy parameter and shows the latest logs on top.
> 
> 
> Thanks,
> 
> Gautam Borad
> 
>


Re: Review Request 42192: RANGER-810 : Audit page should show most recent audit log at the top

Posted by Gautam Borad <gb...@gmail.com>.

> On Jan. 12, 2016, 9:01 p.m., Don Bosco Durai wrote:
> > security-admin/src/main/webapp/scripts/controllers/Controller.js, line 97
> > <https://reviews.apache.org/r/42192/diff/1/?file=1194365#file1194365line97>
> >
> >     In Solr, we also have seq_num. I feel, when it is Solr Audit repository, we should add also to the sort

@Bosco, 
There will be two cases here : 

1. Do we want multiple sort orders (eventTime and seq_num) ? Currently only single sort order is supported.
2. Do we want to sort by seq_num if REST call has sortBy=eventTime for Audit to Solr cases? This will require server side changes also.

If required, we can create a new Jira and discuss this there.


- Gautam


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42192/#review114065
-----------------------------------------------------------


On Jan. 12, 2016, 1:36 p.m., Gautam Borad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42192/
> -----------------------------------------------------------
> 
> (Updated Jan. 12, 2016, 1:36 p.m.)
> 
> 
> Review request for ranger, Alok Lal, Don Bosco Durai, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-810
>     https://issues.apache.org/jira/browse/RANGER-810
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Problem Statement : 
> On selecting the Audit tab, the audit logs are listed in ascending order of audit event time - showing the oldest log at the top. 
> 
> As part of changes added in RANGER-733, we removed using custom sort orders and started taking only the default sort orders defined in super classes (in XAccessAuditService.java). Because of which, sort order which was getting set in XAccessAuditService.java to eventTime is now set to default field (id), and from UI side, we were not fetching the collection by setting any sort order. Because of this, we are seeing audit logs ordered by Id not eventTime. 
> 
> 
> Proposed Solution :
> Earlier we did not send sortBy parameter in request while fetching the collection. Now, we are sending the sortBy=eventTime  parameter with request for fetching the Audit Acess collection.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/webapp/scripts/controllers/Controller.js 7b9cc39 
> 
> Diff: https://reviews.apache.org/r/42192/diff/
> 
> 
> Testing
> -------
> 
> Tested for :
> 
> 1) Sorting of Audit Access Logs on first load 
> 2) Default sort order, when we click on Refresh icon
> 3) Default sort order, after switching the Tab
> 
> Observation : 
> 
> It retained the sortBy parameter and shows the latest logs on top.
> 
> 
> Thanks,
> 
> Gautam Borad
> 
>


Re: Review Request 42192: RANGER-810 : Audit page should show most recent audit log at the top

Posted by Don Bosco Durai <bo...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42192/#review114065
-----------------------------------------------------------



security-admin/src/main/webapp/scripts/controllers/Controller.js (line 97)
<https://reviews.apache.org/r/42192/#comment174856>

    In Solr, we also have seq_num. I feel, when it is Solr Audit repository, we should add also to the sort


- Don Bosco Durai


On Jan. 12, 2016, 1:36 p.m., Gautam Borad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42192/
> -----------------------------------------------------------
> 
> (Updated Jan. 12, 2016, 1:36 p.m.)
> 
> 
> Review request for ranger, Alok Lal, Don Bosco Durai, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-810
>     https://issues.apache.org/jira/browse/RANGER-810
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Problem Statement : 
> On selecting the Audit tab, the audit logs are listed in ascending order of audit event time - showing the oldest log at the top. 
> 
> As part of changes added in RANGER-733, we removed using custom sort orders and started taking only the default sort orders defined in super classes (in XAccessAuditService.java). Because of which, sort order which was getting set in XAccessAuditService.java to eventTime is now set to default field (id), and from UI side, we were not fetching the collection by setting any sort order. Because of this, we are seeing audit logs ordered by Id not eventTime. 
> 
> 
> Proposed Solution :
> Earlier we did not send sortBy parameter in request while fetching the collection. Now, we are sending the sortBy=eventTime  parameter with request for fetching the Audit Acess collection.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/webapp/scripts/controllers/Controller.js 7b9cc39 
> 
> Diff: https://reviews.apache.org/r/42192/diff/
> 
> 
> Testing
> -------
> 
> Tested for :
> 
> 1) Sorting of Audit Access Logs on first load 
> 2) Default sort order, when we click on Refresh icon
> 3) Default sort order, after switching the Tab
> 
> Observation : 
> 
> It retained the sortBy parameter and shows the latest logs on top.
> 
> 
> Thanks,
> 
> Gautam Borad
> 
>


Re: Review Request 42192: RANGER-810 : Audit page should show most recent audit log at the top

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42192/#review113996
-----------------------------------------------------------

Ship it!


Ship It!

- Madhan Neethiraj


On Jan. 12, 2016, 1:36 p.m., Gautam Borad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42192/
> -----------------------------------------------------------
> 
> (Updated Jan. 12, 2016, 1:36 p.m.)
> 
> 
> Review request for ranger, Alok Lal, Don Bosco Durai, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-810
>     https://issues.apache.org/jira/browse/RANGER-810
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Problem Statement : 
> On selecting the Audit tab, the audit logs are listed in ascending order of audit event time - showing the oldest log at the top. 
> 
> As part of changes added in RANGER-733, we removed using custom sort orders and started taking only the default sort orders defined in super classes (in XAccessAuditService.java). Because of which, sort order which was getting set in XAccessAuditService.java to eventTime is now set to default field (id), and from UI side, we were not fetching the collection by setting any sort order. Because of this, we are seeing audit logs ordered by Id not eventTime. 
> 
> 
> Proposed Solution :
> Earlier we did not send sortBy parameter in request while fetching the collection. Now, we are sending the sortBy=eventTime  parameter with request for fetching the Audit Acess collection.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/webapp/scripts/controllers/Controller.js 7b9cc39 
> 
> Diff: https://reviews.apache.org/r/42192/diff/
> 
> 
> Testing
> -------
> 
> Tested for :
> 
> 1) Sorting of Audit Access Logs on first load 
> 2) Default sort order, when we click on Refresh icon
> 3) Default sort order, after switching the Tab
> 
> Observation : 
> 
> It retained the sortBy parameter and shows the latest logs on top.
> 
> 
> Thanks,
> 
> Gautam Borad
> 
>