title: Spring security filter authenticates sucessfuly but sends back 403 response
body: <p>I have a spring boot app with the following web security configuration: </p>
  
  <pre><code>@Override
  protected void configure(HttpSecurity http) throws Exception {
      http
          .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
          .and()
          .authorizeRequests()
              .antMatchers("/login**", "/signup**").permitAll()
          .and()
          .csrf().disable()
          .authorizeRequests()
              .anyRequest().authenticated()
          .and()
          .addFilterBefore(jwtAuthenticationFilter,
              UsernamePasswordAuthenticationFilter.class);
  }
  </code></pre>
  
  <p>The <code>JWTAuthenticationFilter</code> looks like this : </p>
  
  <pre><code>@Component
  public class JWTAuthenticationFilter extends AbstractAuthenticationProcessingFilter {
  
      @Autowired
      private UserDetailsService customUserDetailsService;
  
      private static Logger logger = LoggerFactory.getLogger(JWTAuthenticationFilter.class);
      private final static UrlPathHelper urlPathHelper = new UrlPathHelper();
  
      public JWTAuthenticationFilter() {
          super("/greeting");
          setAuthenticationManager(new NoOpAuthenticationManager());
      }
  
      @Override
      public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException, IOException, ServletException {
          Authentication authentication = AuthenticationService.getAuthentication(request, customUserDetailsService);
          return getAuthenticationManager().authenticate(authentication);
      }
  
      @Override
      protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException failed) throws IOException, ServletException {
          logger.debug("failed authentication while attempting to access " + urlPathHelper.getPathWithinApplication((HttpServletRequest) request));
      }
  } 
  </code></pre>
  
  <p><strong>1.</strong> Authentication is done successfuly, I even see the following log line in the console:</p>
  
  <pre><code>2017-05-19 03:11:42 [https-jsse-nio-8443-exec-4] DEBUG c.b.c.s.a.j.JWTAuthenticationFilter -
                  Authentication success. Updating SecurityContextHolder to contain: org.springframework.security.authentication.UsernamePasswordAuthenticationToken@f297a5c8: Principal: administrator; Credentials: [PROTECTED]; Authenticated: true; Details: null; Granted Authorities: USER_ROLE
  </code></pre>
  
  <p>but still the client side, 403 response is recieved.</p>
  
  <p><strong>2.</strong> I want to make this authentication filter execute for all endpoints, except those with <code>permitAll</code> in the web security configurer. How should I do that? </p>