public class SyslogAuditEventHandler extends AuditEventHandlerBase
SyslogFormatter
to a syslog daemon using
the configured SyslogPublisher
. The publisher is flushed after each write.eventTopicsMetaData
Constructor and Description |
---|
SyslogAuditEventHandler(SyslogAuditEventHandlerConfiguration configuration,
EventTopicsMetaData eventTopicsMetaData,
ProductInfoProvider productInfoProvider,
LocalHostNameProvider localHostNameProvider)
Create a new SyslogAuditEventHandler instance.
|
Modifier and Type | Method and Description |
---|---|
Promise<ResourceResponse,ResourceException> |
publishEvent(Context context,
String topic,
JsonValue event)
Publishes an event to the provided topic.
|
Promise<QueryResponse,ResourceException> |
queryEvents(Context context,
String topic,
QueryRequest queryRequest,
QueryResourceHandler queryResourceHandler)
Query some events from the provided topic.
|
Promise<ResourceResponse,ResourceException> |
readEvent(Context context,
String topic,
String resourceId)
Reads an event with the provided resource id from the provided topic.
|
void |
shutdown()
Closes the connections established by
SyslogPublisher . |
void |
startup()
Instruct this object that it is safe to initialize file handles and network connections.
|
getHandledTopics, getName, handleAction, isEnabled
@Inject public SyslogAuditEventHandler(SyslogAuditEventHandlerConfiguration configuration, EventTopicsMetaData eventTopicsMetaData, ProductInfoProvider productInfoProvider, LocalHostNameProvider localHostNameProvider)
configuration
- Configuration parameters that can be adjusted by system administrators.eventTopicsMetaData
- Meta-data for all audit event topics.productInfoProvider
- Provides info such as product name.localHostNameProvider
- Provides local host name.public void startup()
Reconfiguration of the AuditService
and its handlers is achieved by replacing
rather than modifying the existing objects. Therefore, it's essential that the replacements do not perform
any I/O that would interfere with the operation of the objects they are replacing until the old objects are
shutdown. For example, when shutting down an old instance of a file-based AuditEventHandler, the old instance
may need to flush buffers, apply file rotation or retention policies, or even add line or block signatures
as part of tamper evident logging. Any of these operations could be broken if two handler instances are
operating on the same set of files simultaneously.
public void shutdown()
SyslogPublisher
.public Promise<ResourceResponse,ResourceException> publishEvent(Context context, String topic, JsonValue event)
AuditEventHandler
context
- The context chain that initiated the event.topic
- The topic where to publish the event.event
- The event to publish.public Promise<QueryResponse,ResourceException> queryEvents(Context context, String topic, QueryRequest queryRequest, QueryResourceHandler queryResourceHandler)
AuditEventHandler
context
- The context chain that initiated the event.topic
- The topic on which query is performed.queryRequest
- The request with the query.queryResourceHandler
- The handler to process responses for the query.public Promise<ResourceResponse,ResourceException> readEvent(Context context, String topic, String resourceId)
AuditEventHandler
context
- The context chain that initiated the event.topic
- The topic where event is read.resourceId
- The identifier of the event.Copyright 2011-2017 ForgeRock AS.