Package org.forgerock.audit
Class AuditServiceConfiguration
- java.lang.Object
-
- org.forgerock.audit.AuditServiceConfiguration
-
public class AuditServiceConfiguration extends Object
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 Modifier and Type Field Description static List<String>
DEFAULT_CASE_INSENSITIVE_FIELDS
Default value forgetCaseInsensitiveFields()
.
-
Constructor Summary
Constructors Constructor Description AuditServiceConfiguration()
Empty constructor.AuditServiceConfiguration(AuditServiceConfiguration config)
Copy-constructor, in order to obtain a copy from an existing configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getAvailableAuditEventHandlers()
Returns a list of class names of available audit event handlers.List<String>
getCaseInsensitiveFields()
Get the list of audit event fields to treat case-insensitively when filtering.Map<String,FilterPolicy>
getFilterPolicies()
Get the filter policy mappings.String
getHandlerForQueries()
Returns the name of the handler to use for querying the audit events.void
setAvailableAuditEventHandlers(List<String> availableAuditEventHandlers)
Sets the list of available audit event handlers.void
setCaseInsensitiveFields(List<String> caseInsensitiveFields)
Set the list of audit event fields to treat case-insensitively when filtering.void
setFilterPolicies(Map<String,FilterPolicy> filterPolicies)
Set the filter policy mappings.void
setHandlerForQueries(String name)
Sets the name of the handler to use for querying the audit events.
-
-
-
Field Detail
-
DEFAULT_CASE_INSENSITIVE_FIELDS
public static final List<String> DEFAULT_CASE_INSENSITIVE_FIELDS
Default value forgetCaseInsensitiveFields()
.
-
-
Constructor Detail
-
AuditServiceConfiguration
public AuditServiceConfiguration()
Empty constructor.
-
AuditServiceConfiguration
public AuditServiceConfiguration(AuditServiceConfiguration config)
Copy-constructor, in order to obtain a copy from an existing configuration.- Parameters:
config
- an existing configuration
-
-
Method Detail
-
getHandlerForQueries
public String getHandlerForQueries()
Returns the name of the handler to use for querying the audit events.- Returns:
- the name of the handler.
-
setHandlerForQueries
public void setHandlerForQueries(String name)
Sets the name of the handler to use for querying the audit events.- Parameters:
name
- the name of the handler.
-
getAvailableAuditEventHandlers
public List<String> getAvailableAuditEventHandlers()
Returns a list of class names of available audit event handlers.- Returns:
- the list of available audit event handlers.
-
setAvailableAuditEventHandlers
public void setAvailableAuditEventHandlers(List<String> availableAuditEventHandlers)
Sets the list of available audit event handlers.- Parameters:
availableAuditEventHandlers
- the list of available audit event handlers.
-
getFilterPolicies
public Map<String,FilterPolicy> getFilterPolicies()
Get the filter policy mappings.- Returns:
- The policies.
-
setFilterPolicies
public void setFilterPolicies(Map<String,FilterPolicy> filterPolicies)
Set the filter policy mappings.- Parameters:
filterPolicies
- The policies.
-
getCaseInsensitiveFields
public List<String> 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
public void setCaseInsensitiveFields(List<String> caseInsensitiveFields)
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.
-
-