Package org.wildfly.security.audit
Class SimpleSecurityEventFormatter
- java.lang.Object
-
- org.wildfly.security.auth.server.event.SecurityEventVisitor<Void,String>
-
- org.wildfly.security.audit.SimpleSecurityEventFormatter
-
public class SimpleSecurityEventFormatter extends SecurityEventVisitor<Void,String>
A formatter for security events that converts events into human-readable strings.- Author:
- Darran Lofthouse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SimpleSecurityEventFormatter.Builder
A builder for simple security event formatter.
-
Field Summary
Fields Modifier and Type Field Description private Supplier<DateTimeFormatter>
dateFormatSupplier
-
Constructor Summary
Constructors Constructor Description SimpleSecurityEventFormatter(SimpleSecurityEventFormatter.Builder builder)
-
Method Summary
-
Methods inherited from class org.wildfly.security.auth.server.event.SecurityEventVisitor
handleAuthenticationEvent, handleAuthenticationSuccessfulEvent, handlePermissionCheckFailedEvent, handlePermissionCheckSuccessfulEvent
-
-
-
-
Field Detail
-
dateFormatSupplier
private final Supplier<DateTimeFormatter> dateFormatSupplier
-
-
Constructor Detail
-
SimpleSecurityEventFormatter
SimpleSecurityEventFormatter(SimpleSecurityEventFormatter.Builder builder)
-
-
Method Detail
-
handleUnknownEvent
public String handleUnknownEvent(SecurityEvent event, Void param)
Description copied from class:SecurityEventVisitor
Handle any unhandled security event.- Overrides:
handleUnknownEvent
in classSecurityEventVisitor<Void,String>
- Parameters:
event
- the security eventparam
- the visitor parameter- Returns:
- the visitor return value
-
handleUnknownEvent
private void handleUnknownEvent(SecurityEvent event, StringBuilder stringBuilder)
-
handleDefiniteOutcomeEvent
public String handleDefiniteOutcomeEvent(SecurityDefiniteOutcomeEvent event, Void param)
Description copied from class:SecurityEventVisitor
Handle a security definite outcome event.- Overrides:
handleDefiniteOutcomeEvent
in classSecurityEventVisitor<Void,String>
- Parameters:
event
- the security eventparam
- the visitor parameter- Returns:
- the visitor return value
-
handleDefiniteOutcomeEvent
private void handleDefiniteOutcomeEvent(SecurityDefiniteOutcomeEvent event, StringBuilder stringBuilder)
-
handleAuthenticationFailedEvent
public String handleAuthenticationFailedEvent(SecurityAuthenticationFailedEvent event, Void param)
Description copied from class:SecurityEventVisitor
Handle a security authentication failed event.- Overrides:
handleAuthenticationFailedEvent
in classSecurityEventVisitor<Void,String>
- Parameters:
event
- the security eventparam
- the visitor parameter- Returns:
- the visitor return value
-
handleAuthenticationFailedEvent
private void handleAuthenticationFailedEvent(SecurityAuthenticationFailedEvent event, StringBuilder stringBuilder)
-
handlePermissionCheckEvent
public String handlePermissionCheckEvent(SecurityPermissionCheckEvent event, Void param)
Description copied from class:SecurityEventVisitor
Handle a security permission check event.- Overrides:
handlePermissionCheckEvent
in classSecurityEventVisitor<Void,String>
- Parameters:
event
- the security eventparam
- the visitor parameter- Returns:
- the visitor return value
-
handlePermissionCheckEvent
private void handlePermissionCheckEvent(SecurityPermissionCheckEvent event, StringBuilder stringBuilder)
-
handleSyslogAuditEvent
public String handleSyslogAuditEvent(SyslogAuditEvent event, Void param)
Description copied from class:SecurityEventVisitor
Handle an auditable event that is to be logged to syslog.- Overrides:
handleSyslogAuditEvent
in classSecurityEventVisitor<Void,String>
- Parameters:
event
- the security eventparam
- the visitor parameter- Returns:
- the visitor return value
-
handleSyslogAuditEvent
private void handleSyslogAuditEvent(SyslogAuditEvent event, StringBuilder stringBuilder)
-
handleRealmUnavailableEvent
public String handleRealmUnavailableEvent(SecurityRealmUnavailableEvent event, Void param)
Description copied from class:SecurityEventVisitor
Handle a security realm unavailable event.- Overrides:
handleRealmUnavailableEvent
in classSecurityEventVisitor<Void,String>
- Parameters:
event
- the security eventparam
- the visitor parameter- Returns:
- the visitor return value
-
handleRealmUnavailableEvent
private void handleRealmUnavailableEvent(SecurityRealmUnavailableEvent event, StringBuilder stringBuilder)
-
builder
public static SimpleSecurityEventFormatter.Builder builder()
Create a new builder.- Returns:
- a new builder
-
-