You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Neeru Gupta <gu...@us.ibm.com> on 2016/12/20 17:49:33 UTC

Review Request 54907: ATLAS-1391 Add exclusion mechanism for Atlas audit mechanism

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

Review request for atlas.


Bugs: ATLAS-1391
    https://issues.apache.org/jira/browse/ATLAS-1391


Repository: atlas


Description
-------

Merge branch 'master' into OMS_852


Diffs
-----

  repository/src/main/java/org/apache/atlas/util/AtlasRepositoryConfiguration.java 4b6f88f45dc6bf5ec9a149c06b38059c0c43559a 
  webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java 7499cde4c5dc6a2c5253cd7a354a6add7d8e02e4 
  webapp/src/test/java/org/apache/atlas/web/filters/AuditFilterTest.java PRE-CREATION 

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


Testing
-------

Added new test class 'AuditFilterTest'


Thanks,

Neeru Gupta


Re: Review Request 54907: ATLAS-1391 Add exclusion mechanism for Atlas audit mechanism

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




webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java (line 137)
<https://reviews.apache.org/r/54907/#comment230801>

    Consider moving lines #137 and #138 inside the 'if' block at line #146 - to avoid any overhead when there are no audit-exclusions.



webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java (line 147)
<https://reviews.apache.org/r/54907/#comment230803>

    Instead of iterating through the list, consider using a Set:
    
      Set<String> auditExcludedOperations; // corresponding changes needed in AtlasRepositoryConfiguration
    
      skipped = auditExcludedOperations.contains(requestHttpMethod.toLowerCase() + ":" + requestOperation.toLowerCase());
      
    
    Better yet, consider replacing this method with the following in AtlasRepositoryConfiguration, to isolate the details inside AtlasRepositoryConfiguration:
    
    public class AtlasRepositoryConfiguration {
      public static boolean isExcludedFromAudit(String httpMethod, String httpUrl);
    }


- Madhan Neethiraj


On Dec. 20, 2016, 5:49 p.m., Neeru Gupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54907/
> -----------------------------------------------------------
> 
> (Updated Dec. 20, 2016, 5:49 p.m.)
> 
> 
> Review request for atlas.
> 
> 
> Bugs: ATLAS-1391
>     https://issues.apache.org/jira/browse/ATLAS-1391
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Merge branch 'master' into OMS_852
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/util/AtlasRepositoryConfiguration.java 4b6f88f45dc6bf5ec9a149c06b38059c0c43559a 
>   webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java 7499cde4c5dc6a2c5253cd7a354a6add7d8e02e4 
>   webapp/src/test/java/org/apache/atlas/web/filters/AuditFilterTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/54907/diff/
> 
> 
> Testing
> -------
> 
> Added new test class 'AuditFilterTest'
> 
> 
> Thanks,
> 
> Neeru Gupta
> 
>


Re: Review Request 54907: ATLAS-1391 Add exclusion mechanism for Atlas audit mechanism

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


Fix it, then Ship it!





webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java (line 100)
<https://reviews.apache.org/r/54907/#comment231577>

    After changes in ATLAS-1281, audit logs are saved only to audit.log (in audit() method below, using AUDIT_LOG logger) and not to application.log.
    
    If you didn't mean to revert this change, I can remove line #100 before committing this patch. Please let me know.


- Madhan Neethiraj


On Jan. 3, 2017, 8:09 p.m., Neeru Gupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54907/
> -----------------------------------------------------------
> 
> (Updated Jan. 3, 2017, 8:09 p.m.)
> 
> 
> Review request for atlas.
> 
> 
> Bugs: ATLAS-1391
>     https://issues.apache.org/jira/browse/ATLAS-1391
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Merge branch 'master' into OMS_852
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/util/AtlasRepositoryConfiguration.java 4b6f88f45dc6bf5ec9a149c06b38059c0c43559a 
>   webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java 7499cde4c5dc6a2c5253cd7a354a6add7d8e02e4 
>   webapp/src/test/java/org/apache/atlas/web/filters/AuditFilterTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/54907/diff/
> 
> 
> Testing
> -------
> 
> Added new test class 'AuditFilterTest'
> 
> 
> Thanks,
> 
> Neeru Gupta
> 
>


Re: Review Request 54907: ATLAS-1391 Add exclusion mechanism for Atlas audit mechanism

Posted by Neeru Gupta <gu...@us.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54907/
-----------------------------------------------------------

(Updated Jan. 3, 2017, 8:09 p.m.)


Review request for atlas.


Bugs: ATLAS-1391
    https://issues.apache.org/jira/browse/ATLAS-1391


Repository: atlas


Description
-------

Merge branch 'master' into OMS_852


Diffs (updated)
-----

  repository/src/main/java/org/apache/atlas/util/AtlasRepositoryConfiguration.java 4b6f88f45dc6bf5ec9a149c06b38059c0c43559a 
  webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java 7499cde4c5dc6a2c5253cd7a354a6add7d8e02e4 
  webapp/src/test/java/org/apache/atlas/web/filters/AuditFilterTest.java PRE-CREATION 

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


Testing
-------

Added new test class 'AuditFilterTest'


Thanks,

Neeru Gupta