Package org.forgerock.audit.handlers.csv
Class CsvAuditEventHandlerConfiguration
- java.lang.Object
-
- org.forgerock.audit.events.handlers.EventHandlerConfiguration
-
- org.forgerock.audit.events.handlers.FileBasedEventHandlerConfiguration
-
- org.forgerock.audit.handlers.csv.CsvAuditEventHandlerConfiguration
-
public class CsvAuditEventHandlerConfiguration extends FileBasedEventHandlerConfiguration
A configuration for CSV audit event handler.This configuration object can be created from JSON. Example of valid JSON configuration:
{ "name" : "csv", "topics": [ "access", "activity", "config", "authentication" ], "logDirectory" : "/path/to/audit/files/", "formatting" : { "quoteChar" : "\"", "delimiterChar" : ",", "endOfLineSymbols" : "\n" }, "security" : { "enabled" : "true", "filename" : "/path/to/keystore.jks", "password" : "correcthorsebatterystaple", "signatureInterval" : "3 seconds" }, "buffering" : { "enabled" : "true", "autoFlush" : "true" } }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CsvAuditEventHandlerConfiguration.CsvFormatting
Contains the csv writer configuration parameters.static class
CsvAuditEventHandlerConfiguration.CsvSecurity
Contains the configuration parameters to configure tamper evident logging.static class
CsvAuditEventHandlerConfiguration.EventBufferingConfiguration
Configuration of event buffering.-
Nested classes/interfaces inherited from class org.forgerock.audit.events.handlers.FileBasedEventHandlerConfiguration
FileBasedEventHandlerConfiguration.FileRetention, FileBasedEventHandlerConfiguration.FileRotation
-
-
Field Summary
Fields Modifier and Type Field Description protected CsvAuditEventHandlerConfiguration.EventBufferingConfiguration
buffering
Event buffering is disabled by default.
-
Constructor Summary
Constructors Constructor Description CsvAuditEventHandlerConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CsvAuditEventHandlerConfiguration.EventBufferingConfiguration
getBuffering()
Returns the configuration for events buffering.CsvAuditEventHandlerConfiguration.CsvFormatting
getFormatting()
Returns the CSV formatting options.String
getLogDirectory()
Returns the directory where CSV file is located.CsvAuditEventHandlerConfiguration.CsvSecurity
getSecurity()
Returns the CSV tamper evident options.boolean
isUsableForQueries()
States if anAuditEventHandler
can be used for queries.void
setBufferingConfiguration(CsvAuditEventHandlerConfiguration.EventBufferingConfiguration bufferingConfiguration)
Sets the configuration for events buffering.void
setFormatting(CsvAuditEventHandlerConfiguration.CsvFormatting formatting)
Sets the CSV formatting options.void
setLogDirectory(String directory)
Sets the directory where CSV file is located.void
setSecurity(CsvAuditEventHandlerConfiguration.CsvSecurity security)
Sets the CSV tamper evident options.-
Methods inherited from class org.forgerock.audit.events.handlers.FileBasedEventHandlerConfiguration
getFileRetention, getFileRotation, getRotationRetentionCheckInterval, setFileRetention, setFileRotation, setRotationRetentionCheckInterval
-
Methods inherited from class org.forgerock.audit.events.handlers.EventHandlerConfiguration
getName, getTopics, isEnabled, setEnabled, setName, setTopics
-
-
-
-
Field Detail
-
buffering
@JsonPropertyDescription("audit.handlers.csv.buffering") protected CsvAuditEventHandlerConfiguration.EventBufferingConfiguration buffering
Event buffering is disabled by default.
-
-
Method Detail
-
getLogDirectory
public String getLogDirectory()
Returns the directory where CSV file is located.- Returns:
- the location of the CSV file.
-
setLogDirectory
public void setLogDirectory(String directory)
Sets the directory where CSV file is located.- Parameters:
directory
- the directory.
-
getFormatting
public CsvAuditEventHandlerConfiguration.CsvFormatting getFormatting()
Returns the CSV formatting options.- Returns:
- the CSV formatting options.
-
setFormatting
public void setFormatting(CsvAuditEventHandlerConfiguration.CsvFormatting formatting)
Sets the CSV formatting options.- Parameters:
formatting
- the CSV formatting options to set.
-
getSecurity
public CsvAuditEventHandlerConfiguration.CsvSecurity getSecurity()
Returns the CSV tamper evident options.- Returns:
- the CSV tamper evident options.
-
setSecurity
public void setSecurity(CsvAuditEventHandlerConfiguration.CsvSecurity security)
Sets the CSV tamper evident options.- Parameters:
security
- the CSV tamper evident options to set.
-
getBuffering
public CsvAuditEventHandlerConfiguration.EventBufferingConfiguration getBuffering()
Returns the configuration for events buffering.- Returns:
- the configuration
-
setBufferingConfiguration
public void setBufferingConfiguration(CsvAuditEventHandlerConfiguration.EventBufferingConfiguration bufferingConfiguration)
Sets the configuration for events buffering.- Parameters:
bufferingConfiguration
- The configuration
-
isUsableForQueries
public boolean isUsableForQueries()
Description copied from class:EventHandlerConfiguration
States if anAuditEventHandler
can be used for queries.- Specified by:
isUsableForQueries
in classEventHandlerConfiguration
- Returns:
- True - If the
AuditEventHandler
can be used for queries. False - If theAuditEventHandler
can not be used for queries.
-
-