Package org.forgerock.audit
Class AuditServiceConfiguration
java.lang.Object
org.forgerock.audit.AuditServiceConfiguration
Configuration of the audit service.
This configuration object can be created from JSON. Example of valid JSON configuration:
{
"handlerForQueries" : "csv",
"availableAuditEventHandlers" : [
"org.forgerock.audit.events.handler.MyHandler",
"org.forgerock.audit.events.handler.AnotherHandler"
],
"filterPolicies" : {
"field" : {
"excludeIf" : [],
"includeIf" : [
"/access/filter/field"
]
},
"value" : {
"excludeIf" : [],
"includeIf" : [
"/access/filter/value"
]
}
},
"caseInsensitiveFields" : [
"/access/http/request/headers"
]
}
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor.Copy-constructor, in order to obtain a copy from an existing configuration. -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of class names of available audit event handlers.Get the list of audit event fields to treat case-insensitively when filtering.Get the filter policy mappings.Returns the name of the handler to use for querying the audit events.voidsetAvailableAuditEventHandlers(List<String> availableAuditEventHandlers) Sets the list of available audit event handlers.voidsetCaseInsensitiveFields(List<String> caseInsensitiveFields) Set the list of audit event fields to treat case-insensitively when filtering.voidsetFilterPolicies(Map<String, FilterPolicy> filterPolicies) Set the filter policy mappings.voidsetHandlerForQueries(String name) Sets the name of the handler to use for querying the audit events.
-
Field Details
-
DEFAULT_CASE_INSENSITIVE_FIELDS
Default value forgetCaseInsensitiveFields().
-
-
Constructor Details
-
AuditServiceConfiguration
public AuditServiceConfiguration()Empty constructor. -
AuditServiceConfiguration
Copy-constructor, in order to obtain a copy from an existing configuration.- Parameters:
config- an existing configuration
-
-
Method Details
-
getHandlerForQueries
Returns the name of the handler to use for querying the audit events.- Returns:
- the name of the handler.
-
setHandlerForQueries
Sets the name of the handler to use for querying the audit events.- Parameters:
name- the name of the handler.
-
getAvailableAuditEventHandlers
Returns a list of class names of available audit event handlers.- Returns:
- the list of available audit event handlers.
-
setAvailableAuditEventHandlers
Sets the list of available audit event handlers.- Parameters:
availableAuditEventHandlers- the list of available audit event handlers.
-
getFilterPolicies
Get the filter policy mappings.- Returns:
- The policies.
-
setFilterPolicies
Set the filter policy mappings.- Parameters:
filterPolicies- The policies.
-
getCaseInsensitiveFields
Get the list of audit event fields to treat case-insensitively when filtering. Fields are referenced using JSON pointer syntax.- Returns:
- JSON pointer references to audit event fields which should be filtered case-insensitively.
-
setCaseInsensitiveFields
Set the list of audit event fields to treat case-insensitively when filtering. Fields should be referenced using JSON pointer syntax. List can be null or empty.- Parameters:
caseInsensitiveFields- The JSON pointer audit event field references.
-