Audits

CAS uses the Inspektr framework for auditing purposes and statistics. The Inspektr project allows for non-intrusive auditing and logging of the coarse-grained execution paths e.g. Spring-managed beans method executions by using annotations and Spring-managed @Aspect-style aspects.

CAS server auto-configures all the relevant Inspektr components. All the available configuration options that are injected to Inspektr classes are available to deployers via relevant CAS properties. Note that the audit record management functionality of CAS supports handling multiple audit record destinations at the same time. In other words, you may choose to route audit records to both a database and a REST endpoint as well as any number of logger-based destinations all at the same time.

The following settings and properties are available from the CAS configuration catalog:

The configuration settings listed below are tagged as Required in the CAS configuration metadata. This flag indicates that the presence of the setting may be needed to activate or affect the behavior of the CAS feature and generally should be reviewed, possibly owned and adjusted. If the setting is assigned a default value, you do not need to strictly put the setting in your copy of the configuration, but should review it nonetheless to make sure it matches your deployment expectations.

The configuration settings listed below are tagged as Optional in the CAS configuration metadata. This flag indicates that the presence of the setting is not immediately necessary in the end-user CAS configuration, because a default value is assigned or the activation of the feature is not conditionally controlled by the setting value.

  • cas.audit.engine.alternate-client-addr-header-name=
  • Request header to use identify the client address.

    If the application is sitting behind a load balancer, the client address typically ends up being the load balancer address itself. A common example for a header here would be X-Forwarded-For to glean the client address from the request, assuming the load balancer is configured correctly to pass that header along.

    org.apereo.cas.configuration.model.core.audit.AuditEngineProperties.

  • cas.audit.engine.alternate-server-addr-header-name=
  • Request header to use identify the server address.

    org.apereo.cas.configuration.model.core.audit.AuditEngineProperties.

  • cas.audit.engine.app-code=CAS
  • Application code to use in the audit logs.

    This is a unique code that acts as the identifier for the application. In case audit logs are aggregated in a central location. This makes it easy to identify the application and filter results based on the code.

    org.apereo.cas.configuration.model.core.audit.AuditEngineProperties.

  • cas.audit.engine.audit-format=DEFAULT
  • The audit format to use in the logs. Available values are as follows:

    • DEFAULT: Default audit format.
    • JSON: Output audit logs as JSON strings where necessary/possible.

    org.apereo.cas.configuration.model.core.audit.AuditEngineProperties.

  • cas.audit.engine.enabled=true
  • Whether auditing functionality should be enabled.

    org.apereo.cas.configuration.model.core.audit.AuditEngineProperties.

  • cas.audit.engine.excluded-actions=
  • Indicate a list of supported audit actions that should be excluded, filtered and ignored by CAS audit managers. Each supported action can be treated as a regular expression to match against built-in CAS actions.

    org.apereo.cas.configuration.model.core.audit.AuditEngineProperties.

  • cas.audit.engine.ignore-audit-failures=false
  • Indicates whether catastrophic audit failures should be logged or whether errors should bubble up and thrown back.

    org.apereo.cas.configuration.model.core.audit.AuditEngineProperties.

  • cas.audit.engine.include-validation-assertion=false
  • Whether ticket validation events in the audit log should include information about the assertion that is validated; things such as the principal id and attributes released.

    org.apereo.cas.configuration.model.core.audit.AuditEngineProperties.

  • cas.audit.engine.number-of-days-in-history=30
  • Retrieve audit records from storage, starting from now and going back the indicated number of days in history.

    org.apereo.cas.configuration.model.core.audit.AuditEngineProperties.

  • cas.audit.engine.supported-actions=
  • Indicate a list of supported audit actions that should be recognized, processed and recorded by CAS audit managers. Each supported action can be treated as a regular expression to match against built-in CAS actions.

    org.apereo.cas.configuration.model.core.audit.AuditEngineProperties.

  • cas.audit.engine.use-server-host-address=false
  • Determines whether a local DNS lookup should be made to query for the CAS server address.

    By default, the server is address is determined from the request. Aside from special headers, this option allows one to query DNS to look up the server address of the CAS server processing requests.

    org.apereo.cas.configuration.model.core.audit.AuditEngineProperties.