Package io.helidon.security.spi
Interface AuditProvider
-
- All Superinterfaces:
SecurityProvider
- 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 (usingSecurity.Builder.addAuditProvider(AuditProvider)
) a default provider will be used.Default audit provider logs most events in
Level.FINEST
.AuditEvent.AuditSeverity.AUDIT_FAILURE
andAuditEvent.AuditSeverity.ERROR
are logged inLevel.SEVERE
andAuditEvent.AuditSeverity.WARN
is logged inLevel.WARNING
level.Format of default audit provider log record (all end of lines are removed from message, not from stack trace):
year.month.day hour(24):minute:second LogLevel AUDIT auditSeverity tracingId auditEventType auditEventClassName location(class) location(method) location(sourceFile) location(line) :: "audit message"
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
AuditProvider.AuditSource
Source of an audit source (as in "where this audit event originated").static interface
AuditProvider.TracedAuditEvent
Audit event sent to Audit provider.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Consumer<AuditProvider.TracedAuditEvent>
auditConsumer()
Return your subscriber for audit events.-
Methods inherited from interface io.helidon.security.spi.SecurityProvider
supportedAnnotations, supportedAttributes, supportedConfigKeys, supportedCustomObjects
-
-
-
-
Method Detail
-
auditConsumer
Consumer<AuditProvider.TracedAuditEvent> 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.- Returns:
- Consumer that will receive all audit events of this security realm
-
-