Пишете матчер на все и разрешаете его всем. Нужные эндпоинты – закрываете, например:
@Override
protected void configure(final HttpSecurity http) throws Exception {
http
.sessionManagement()
.sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
.csrf().disable()
.exceptionHandling().and()
.anonymous().and()
.servletApi().and()
.authorizeRequests()
.antMatchers(HttpMethod.GET, "/api/**").permitAll()
.antMatchers(HttpMethod.POST, "/api/**").permitAll()
.anyRequest().authenticated().and()
.addFilterBefore(
new AuthFilter(),
UsernamePasswordAuthenticationFilter.class
);
}