New CAS documentation site
CAS documentation has moved over to jasig.github.io/cas, starting with CAS version 4.x. The wiki will no longer be maintained. For the most recent version of the documentation, please refer to the aforementioned link.
The following configuration provides for database-backed auditing and statistics for CAS using the Inspektr Java library. The configuration assumes there exists a bean named "dataSource" that implements
The configuration below is the suggested configuration up until CAS 3.4. In CAS 3.4, the configuration changed. See the configuration further below.
The following configuration is based on the auditTrailContext.xml file in WEB-INF/unused-spring-configuration/auditTrailContext.xml in the CAS 3.3.1 distribution WAR archive. The following configuration must be placed in an XML file in WEB-INF/spring-configuration of the WAR file deployed in your environment; a Maven WAR Overlay is a convenient way to do this in a repeatable fashion.
This is the configuration for CAS 3.4
As of at least CAS 3.4.10, this is included already in the distribution as WEB-INF/spring-configuration/auditTrailContext.xml
Inspektr assumes the database pointed to by the JDBC data source contains tables with the schema described at http://code.google.com/p/inspektr/wiki/DatabaseTables. The following script will create these tables with reasonable indices in Oracle; modify as needed for your database platform.
If you're using the JdbcAuditTrailManager, you might want to automatically clean the audit log. Here's some example code (for your auditTrailContext.xml) that cleans out entries older than 180 days. This has been tested in CAS 3.4.10.