Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added generic interface design for auditing

...

http://localhost:8080/eagle-service/rest/list?query=AuditService[@serviceName="AlertDefinitionService" AND @encodedRowKey="ABC__DEF" AND @actionTaken="CREATE/UPDATE/DELETE"]{*}&]{*}&pageSize=100

 

GENERIC INTERFACE DESIGN

A generic interface for implementing a custom audit source. Modeled similar to the PropertyChangeListener used in TaggedLogAPIEntity.

  1. AuditListener Interface - Contains the method to be implemented for auditing purpose.
  2. HBaseStorageAudit Class - Implements the AuditListener interface. Register the implementation class for callback and override the above method with the custom logic, which builds up the audit data and persists it to a audit table in HBase. Here we enforce the condition which audits only in case of HBase operations related to entities used for Policy/Datasource.
  3. HBaseStorage Class - From the create/update/delete methods call the method in HBaseStorageAudit that triggers the listener method.
  4. AuditSupport Class - Used for maintaining AuditListener implementations and calling.

 

Image Added

 

Adding to the audit columns mentioned in Approach #2, we can also persist the columns available in the @Tags annotation of an entity, so that we can model the audit retrieval service based on the data retrieval service of different entities.

We can also have a configuration parameter which lets us decide whether to use the audit feature or not if required.