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 Details

  • Constructor Details

    • 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 Details

    • 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.