@Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        @ConditionalOnMissingBean(name = "auditTrailManagementAspect")
        public AuditTrailManagementAspect auditTrailManagementAspect(
            @Qualifier("defaultAuditActionDateProvider")
            final AuditActionDateProvider defaultAuditActionDateProvider,
            @Qualifier("casAuditClientInfoResolver")
            final ClientInfoResolver casAuditClientInfoResolver,
            @Qualifier("auditTrailRecordResolutionPlan")
            final AuditTrailRecordResolutionPlan auditTrailRecordResolutionPlan,
            @Qualifier("auditablePrincipalResolver")
            final PrincipalResolver auditablePrincipalResolver,
            @Qualifier("filterAndDelegateAuditTrailManager")
            final AuditTrailManager filterAndDelegateAuditTrailManager,
            final CasConfigurationProperties casProperties) {

            val audit = casProperties.getAudit().getEngine();
            val auditFormat = AuditTrailManager.AuditFormats.valueOf(audit.getAuditFormat().name());
            val aspect = new AuditTrailManagementAspect(
                auditablePrincipalResolver,
                CollectionUtils.wrapList(filterAndDelegateAuditTrailManager),
                auditTrailRecordResolutionPlan.getAuditActionResolvers(),
                auditTrailRecordResolutionPlan.getAuditResourceResolvers(),
                auditTrailRecordResolutionPlan.getAuditPrincipalResolvers(),
                auditFormat,
                defaultAuditActionDateProvider);
            aspect.setFailOnAuditFailures(!audit.isIgnoreAuditFailures());
            aspect.setEnabled(casProperties.getAudit().getEngine().isEnabled());
            aspect.setClientInfoResolver(casAuditClientInfoResolver);
            return aspect;
        }
This is {@link CasCoreAuditAutoConfiguration}.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-audit/src/main/java/org/apereo/cas/config/CasCoreAuditAutoConfiguration.java