Search in sources :

Example 1 with MidpointAllowAllAuthorizationEvaluator

use of com.evolveum.midpoint.authentication.impl.authorization.evaluator.MidpointAllowAllAuthorizationEvaluator in project midpoint by Evolveum.

the class HttpClusterModuleWebSecurityConfigurer method configure.

@Override
protected void configure(HttpSecurity http) throws Exception {
    super.configure(http);
    HttpAuthenticationEntryPoint entryPoint = getObjectPostProcessor().postProcess(new HttpAuthenticationEntryPoint());
    http.antMatcher(AuthUtil.stripEndingSlashes(getPrefix()) + "/**");
    HttpClusterAuthenticationFilter filter = getObjectPostProcessor().postProcess(new HttpClusterAuthenticationFilter(authenticationManager(), entryPoint));
    RememberMeServices rememberMeServices = http.getSharedObject(RememberMeServices.class);
    if (rememberMeServices != null) {
        filter.setRememberMeServices(rememberMeServices);
    }
    http.authorizeRequests().accessDecisionManager(new MidpointAllowAllAuthorizationEvaluator(securityEnforcer, securityContextManager, taskManager));
    http.addFilterAt(filter, BasicAuthenticationFilter.class);
    http.formLogin().disable().csrf().disable();
    getOrApply(http, new MidpointExceptionHandlingConfigurer<>()).authenticationEntryPoint(entryPoint).authenticationTrustResolver(new MidpointAuthenticationTrustResolverImpl());
}
Also used : MidpointAuthenticationTrustResolverImpl(com.evolveum.midpoint.authentication.impl.MidpointAuthenticationTrustResolverImpl) RememberMeServices(org.springframework.security.web.authentication.RememberMeServices) MidpointAllowAllAuthorizationEvaluator(com.evolveum.midpoint.authentication.impl.authorization.evaluator.MidpointAllowAllAuthorizationEvaluator) HttpClusterAuthenticationFilter(com.evolveum.midpoint.authentication.impl.filter.HttpClusterAuthenticationFilter) HttpAuthenticationEntryPoint(com.evolveum.midpoint.authentication.impl.entry.point.HttpAuthenticationEntryPoint)

Aggregations

MidpointAuthenticationTrustResolverImpl (com.evolveum.midpoint.authentication.impl.MidpointAuthenticationTrustResolverImpl)1 MidpointAllowAllAuthorizationEvaluator (com.evolveum.midpoint.authentication.impl.authorization.evaluator.MidpointAllowAllAuthorizationEvaluator)1 HttpAuthenticationEntryPoint (com.evolveum.midpoint.authentication.impl.entry.point.HttpAuthenticationEntryPoint)1 HttpClusterAuthenticationFilter (com.evolveum.midpoint.authentication.impl.filter.HttpClusterAuthenticationFilter)1 RememberMeServices (org.springframework.security.web.authentication.RememberMeServices)1