I have an API called `/process/object` which work...
# questions
u
I have an API called
/process/object
which works fine without any auth, and by default my filterChain in
application.groovy
looks like this
Copy code
grails.plugin.springsecurity.filterChain.chainMap = [
    [pattern: '/**', filters: 'JOINED_FILTERS']
    ]
Now, I have defined a new filter called
tokenAuthenticationFilter
by extending
OncePerRequestFilter
and I am registering this filter under application.groovy like
Copy code
grails.plugin.springsecurity.filterChain.filterNames = ['tokenAuthenticationFilter']
grails.plugin.springsecurity.filterChain.chainMap = [
    [pattern: '/**', filters: 'JOINED_FILTERS,-tokenAuthenticationFilter']
    ]
As soon as I do this, I get the below chain of exceptions,
Copy code
2025-06-26 15:32:54.366 [http-nio-8080-exec-1] ERROR o.a.c.c.C.[.[.[.[dispatcherServletRegistration] - Servlet.service() for servlet [dispatcherServletRegistration] in context with path [] threw exception  
org.springframework.security.authentication.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext
	at org.springframework.security.access.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:350)
	at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:214)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
How can I explicity disable Auth for this? All I have done is introduce a new filter
u
Thank you very much
❤️ 1