Interface AuditProvider

All Superinterfaces:
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AuditProvider extends SecurityProvider
Audit provider, storing audit events. If no custom audit provider is defined (using Security.Builder.addAuditProvider(AuditProvider)) a default provider will be used.

Default audit provider logs most events in Level.FINEST. AuditEvent.AuditSeverity.AUDIT_FAILURE and AuditEvent.AuditSeverity.ERROR are logged in Level.SEVERE and AuditEvent.AuditSeverity.WARN is logged in Level.WARNING level.

Format of default audit provider log record (all end of lines are removed from message, not from stack trace): hour(24):minute:second LogLevel AUDIT auditSeverity tracingId auditEventType auditEventClassName location(class) location(method) location(sourceFile) location(line) :: "audit message"

  • Method Details

    • auditConsumer

      Return your subscriber for audit events. The method is invoked synchronously, so if you want to have low impact on performance, you should handle possible asynchronous processing in the provider implementation.
      Consumer that will receive all audit events of this security realm