Search in sources :

Example 1 with AuditActionResolver

use of org.apereo.inspektr.audit.spi.AuditActionResolver in project cas by apereo.

the class SurrogateAuthenticationAuditConfiguration method configureAuditTrailRecordResolutionPlan.

@Override
public void configureAuditTrailRecordResolutionPlan(final AuditTrailRecordResolutionPlan plan) {
    final AuditActionResolver actionResolver = new DefaultAuditActionResolver("_TRIGGERED", StringUtils.EMPTY);
    plan.registerAuditActionResolver("SURROGATE_AUTHENTICATION_ELIGIBILITY_VERIFICATION_ACTION_RESOLVER", actionResolver);
    plan.registerAuditResourceResolver("SURROGATE_AUTHENTICATION_ELIGIBILITY_VERIFICATION_RESOURCE_RESOLVER", surrogateEligibilityVerificationAuditResourceResolver());
}
Also used : AuditActionResolver(org.apereo.inspektr.audit.spi.AuditActionResolver) DefaultAuditActionResolver(org.apereo.inspektr.audit.spi.support.DefaultAuditActionResolver) DefaultAuditActionResolver(org.apereo.inspektr.audit.spi.support.DefaultAuditActionResolver)

Example 2 with AuditActionResolver

use of org.apereo.inspektr.audit.spi.AuditActionResolver in project cas by apereo.

the class CasCoreAuditConfiguration method auditActionResolverMap.

@Bean
public Map<String, AuditActionResolver> auditActionResolverMap() {
    final Map<String, AuditActionResolver> map = new HashMap<>();
    final AuditActionResolver resolver = authenticationActionResolver();
    map.put("AUTHENTICATION_RESOLVER", resolver);
    map.put("SAVE_SERVICE_ACTION_RESOLVER", resolver);
    map.put("CHANGE_PASSWORD_ACTION_RESOLVER", resolver);
    final AuditActionResolver defResolver = new DefaultAuditActionResolver();
    map.put("DESTROY_TICKET_GRANTING_TICKET_RESOLVER", defResolver);
    map.put("DESTROY_PROXY_GRANTING_TICKET_RESOLVER", defResolver);
    final AuditActionResolver cResolver = ticketCreationActionResolver();
    map.put("CREATE_PROXY_GRANTING_TICKET_RESOLVER", cResolver);
    map.put("GRANT_SERVICE_TICKET_RESOLVER", cResolver);
    map.put("GRANT_PROXY_TICKET_RESOLVER", cResolver);
    map.put("CREATE_TICKET_GRANTING_TICKET_RESOLVER", cResolver);
    map.put("TRUSTED_AUTHENTICATION_ACTION_RESOLVER", cResolver);
    map.put("AUTHENTICATION_EVENT_ACTION_RESOLVER", new DefaultAuditActionResolver("_TRIGGERED", ""));
    final AuditActionResolver adResolver = new DefaultAuditActionResolver();
    map.put("ADAPTIVE_RISKY_AUTHENTICATION_ACTION_RESOLVER", adResolver);
    map.put("VALIDATE_SERVICE_TICKET_RESOLVER", ticketValidationActionResolver());
    return map;
}
Also used : DefaultAuditActionResolver(org.apereo.inspektr.audit.spi.support.DefaultAuditActionResolver) AuditActionResolver(org.apereo.inspektr.audit.spi.AuditActionResolver) HashMap(java.util.HashMap) DefaultAuditActionResolver(org.apereo.inspektr.audit.spi.support.DefaultAuditActionResolver) FilterRegistrationBean(org.springframework.boot.web.servlet.FilterRegistrationBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 3 with AuditActionResolver

use of org.apereo.inspektr.audit.spi.AuditActionResolver in project cas by apereo.

the class CasCoreAuditConfiguration method configureAuditTrailRecordResolutionPlan.

@Override
public void configureAuditTrailRecordResolutionPlan(final AuditTrailRecordResolutionPlan plan) {
    /*
            Add audit action resolvers here.
         */
    final AuditActionResolver resolver = authenticationActionResolver();
    plan.registerAuditActionResolver("AUTHENTICATION_RESOLVER", resolver);
    plan.registerAuditActionResolver("SAVE_SERVICE_ACTION_RESOLVER", resolver);
    final AuditActionResolver defResolver = new DefaultAuditActionResolver();
    plan.registerAuditActionResolver("DESTROY_TICKET_GRANTING_TICKET_RESOLVER", defResolver);
    plan.registerAuditActionResolver("DESTROY_PROXY_GRANTING_TICKET_RESOLVER", defResolver);
    final AuditActionResolver cResolver = ticketCreationActionResolver();
    plan.registerAuditActionResolver("CREATE_PROXY_GRANTING_TICKET_RESOLVER", cResolver);
    plan.registerAuditActionResolver("GRANT_SERVICE_TICKET_RESOLVER", cResolver);
    plan.registerAuditActionResolver("GRANT_PROXY_TICKET_RESOLVER", cResolver);
    plan.registerAuditActionResolver("CREATE_TICKET_GRANTING_TICKET_RESOLVER", cResolver);
    final AuditActionResolver authResolver = new DefaultAuditActionResolver("_TRIGGERED", StringUtils.EMPTY);
    plan.registerAuditActionResolver("AUTHENTICATION_EVENT_ACTION_RESOLVER", authResolver);
    plan.registerAuditActionResolver("VALIDATE_SERVICE_TICKET_RESOLVER", ticketValidationActionResolver());
    final AuditActionResolver serviceAccessResolver = new DefaultAuditActionResolver("_TRIGGERED", StringUtils.EMPTY);
    plan.registerAuditActionResolver("SERVICE_ACCESS_ENFORCEMENT_ACTION_RESOLVER", serviceAccessResolver);
    /*
            Add audit resource resolvers here.
         */
    plan.registerAuditResourceResolver("AUTHENTICATION_RESOURCE_RESOLVER", new CredentialsAsFirstParameterResourceResolver());
    final AuditResourceResolver messageBundleAwareResourceResolver = messageBundleAwareResourceResolver();
    plan.registerAuditResourceResolver("CREATE_TICKET_GRANTING_TICKET_RESOURCE_RESOLVER", messageBundleAwareResourceResolver);
    plan.registerAuditResourceResolver("CREATE_PROXY_GRANTING_TICKET_RESOURCE_RESOLVER", messageBundleAwareResourceResolver);
    final AuditResourceResolver ticketResourceResolver = ticketResourceResolver();
    plan.registerAuditResourceResolver("DESTROY_TICKET_GRANTING_TICKET_RESOURCE_RESOLVER", ticketResourceResolver);
    plan.registerAuditResourceResolver("DESTROY_PROXY_GRANTING_TICKET_RESOURCE_RESOLVER", ticketResourceResolver);
    plan.registerAuditResourceResolver("GRANT_SERVICE_TICKET_RESOURCE_RESOLVER", new ServiceResourceResolver());
    plan.registerAuditResourceResolver("GRANT_PROXY_TICKET_RESOURCE_RESOLVER", new ServiceResourceResolver());
    plan.registerAuditResourceResolver("VALIDATE_SERVICE_TICKET_RESOURCE_RESOLVER", ticketValidationResourceResolver());
    plan.registerAuditResourceResolver("SAVE_SERVICE_RESOURCE_RESOLVER", returnValueResourceResolver());
    plan.registerAuditResourceResolver("AUTHENTICATION_EVENT_RESOURCE_RESOLVER", nullableReturnValueResourceResolver());
    plan.registerAuditResourceResolver("SERVICE_ACCESS_ENFORCEMENT_RESOURCE_RESOLVER", serviceAccessEnforcementAuditResourceResolver());
    /*
            Add custom resolvers here.
         */
    plan.registerAuditActionResolvers(customAuditActionResolverMap());
    plan.registerAuditResourceResolvers(customAuditResourceResolverMap());
}
Also used : ServiceResourceResolver(org.apereo.cas.audit.spi.ServiceResourceResolver) DefaultAuditActionResolver(org.apereo.inspektr.audit.spi.support.DefaultAuditActionResolver) AuditActionResolver(org.apereo.inspektr.audit.spi.AuditActionResolver) DefaultAuditActionResolver(org.apereo.inspektr.audit.spi.support.DefaultAuditActionResolver) NullableReturnValueAuditResourceResolver(org.apereo.cas.audit.spi.NullableReturnValueAuditResourceResolver) ServiceAccessEnforcementAuditResourceResolver(org.apereo.cas.audit.spi.ServiceAccessEnforcementAuditResourceResolver) AuditResourceResolver(org.apereo.inspektr.audit.spi.AuditResourceResolver) CredentialsAsFirstParameterResourceResolver(org.apereo.cas.audit.spi.CredentialsAsFirstParameterResourceResolver)

Aggregations

AuditActionResolver (org.apereo.inspektr.audit.spi.AuditActionResolver)3 DefaultAuditActionResolver (org.apereo.inspektr.audit.spi.support.DefaultAuditActionResolver)3 HashMap (java.util.HashMap)1 CredentialsAsFirstParameterResourceResolver (org.apereo.cas.audit.spi.CredentialsAsFirstParameterResourceResolver)1 NullableReturnValueAuditResourceResolver (org.apereo.cas.audit.spi.NullableReturnValueAuditResourceResolver)1 ServiceAccessEnforcementAuditResourceResolver (org.apereo.cas.audit.spi.ServiceAccessEnforcementAuditResourceResolver)1 ServiceResourceResolver (org.apereo.cas.audit.spi.ServiceResourceResolver)1 AuditResourceResolver (org.apereo.inspektr.audit.spi.AuditResourceResolver)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 FilterRegistrationBean (org.springframework.boot.web.servlet.FilterRegistrationBean)1 Bean (org.springframework.context.annotation.Bean)1