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

Review request for ranger and Madhan Neethiraj.


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


Repository: ranger


Description
-------

Audit to db: if audit information exceeds column size then insertion of audit 
record fails.  Longer values should be truncated and allow to easily control 
the truncated size

- All string columns should be truncated.  Once truncated the value should have 
some marker that’ll show that it was truncated.
- Length at which truncation occurs should be configurable perhaps by 
db-audit-provider sections of audit properties file.
- While at it we could also add the ability to suppress truncation or prevent a 
column from getting into audit all together.
- All of this should be contained to audit to db, e.g. audits written to HDFS 
or Solr should never get truncated.

This change is done on HEAD of 0.5.  I'll port it later to master.


Diffs
-----

  
agents-audit/src/main/java/org/apache/ranger/audit/destination/DBAuditDestination.java
 3d31c06 
  
agents-audit/src/main/java/org/apache/ranger/audit/entity/AuthzAuditEventDbObj.java
 435393e 
  agents-audit/src/main/java/org/apache/ranger/audit/model/AuditEventBase.java 
2c6a87f 
  agents-audit/src/main/java/org/apache/ranger/audit/model/AuthzAuditEvent.java 
d648de3 
  
agents-audit/src/main/java/org/apache/ranger/audit/provider/DbAuditProvider.java
 d475f89 

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


Testing
-------

Reduced column size of resource_path field down to a smaller value and 
reproduced the problem with HDFS.  Then validated that:
- Setting max column size property in audit truncates the resource_path.  It 
has truncation marker in it.
- Setting the column size property to 0 prevents anything from getting output 
to the column.
- Setting the column size to -1 bring the problem back since truncation gets 
suppressed.


Thanks,

Alok Lal

Reply via email to