Class AuditSerdeHelper

java.lang.Object
org.apache.druid.server.audit.AuditSerdeHelper

public class AuditSerdeHelper extends Object
Audit utility class that can be used by different implementations of AuditManager to serialize/deserialize audit payloads based on the values configured in AuditManagerConfig.
  • Constructor Details

    • AuditSerdeHelper

      @Inject public AuditSerdeHelper(AuditManagerConfig config, Escalator escalator, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, com.fasterxml.jackson.databind.ObjectMapper jsonMapperSkipNulls)
  • Method Details

    • shouldProcessAuditEntry

      public boolean shouldProcessAuditEntry(AuditEntry entry)
      Checks if the given audit event needs to be handled.
      Returns:
      true only if the event was not initiated by the Druid system OR if system requests should be audited too.
    • processAuditEntry

      public AuditEntry processAuditEntry(AuditEntry entry)
      Processes the given AuditEntry for further use such as logging or persistence. This involves serializing and truncating the payload based on the values configured in AuditManagerConfig.
      Returns:
      A new AuditEntry with a serialized payload that can be used for logging or persistence.