Hi all,
I tried to use the maxAgeDays config from CAS JDBC audit but failed in CAS 5.3.x / 6.0.x, which is listed here: https://apereo.github.io/cas/6.0.x/configuration/Configuration-Properties.html#database-audits I use maxAgeDays like this in my cas.yml: url: jdbc:mariadb://example.jdbc.com/place user: myuser password: mypassword driverClass: org.mariadb.jdbc.Driver dialect: org.hibernate.dialect.MariaDBDialect ddlAuto: cas.audit.jdbc.maxAgeDays: 1 And the database is as follows: CREATE TABLE `COM_AUDIT_TRAIL` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `AUD_ACTION` varchar(255) DEFAULT NULL, `APPLIC_CD` varchar(255) DEFAULT NULL, `AUD_CLIENT_IP` varchar(255) DEFAULT NULL, `AUD_DATE` datetime NOT NULL, `AUD_RESOURCE` varchar(255) DEFAULT NULL, `AUD_SERVER_IP` varchar(255) DEFAULT NULL, `AUD_USER` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) But the logs kept is more than 1 days, in fact it seems like it never remove the audit logs in my DB. I have no idea why this failed, so I looked into the code and found the maxAgeDays logic trace to this delete statement here: https://github.com/apereo/inspektr/blob/inspektr-1.8.5.GA/inspektr-support-spring/src/main/java/org/apereo/inspektr/audit/support/JdbcAuditTrailManager.java#L461 where maxAgeDays is used as pass as the clean up parameter to make DELETE FROM COM_AUDIT_TRAIL AUD_DATE > maxAgeDay This all triggered inside the clean() function. However, when I serach for the keyword clean(), I didn't find anywhere this was being used, so my question is: 1. Does anybody make maxAgeDays workds before? If so can you share the config? 2. If not, does anybody knows where does the clean() function, trigger? So I can continue my debugging on why this doesn't work, Thanks. Cheers! - Andy -- - Website: https://apereo.github.io/cas - Gitter Chatroom: https://gitter.im/apereo/cas - List Guidelines: https://goo.gl/1VRrw7 - Contributions: https://goo.gl/mh7qDG --- You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/fe99c5f0-0d28-4540-bc17-04fd780a6a02%40apereo.org.
