grails-spring-security-core icon indicating copy to clipboard operation
grails-spring-security-core copied to clipboard

Failed to convert property value of type 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor' to required type 'javax.servlet.Filter'

Open guruscott-meyer opened this issue 1 year ago • 3 comments

Expected Behavior

The app should run and connect to Active Directory over LDAP

Actual Behaviour

Error creating bean with name 'filterInvocationInterceptorDeregistrationBean': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor' to required type 'javax.servlet.Filter' for property 'filter'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor' to required type 'javax.servlet.Filter' for property 'filter': no matching editors or conversion strategy found

Steps To Reproduce

Create a new grails project with embedded tomcat Add grails spring security plugins to build.gradle Declare authManager bean in resources.groovy:

@bean AuthenticationManager authManager(BaseLdapPathContextSource contextSource) { LdapBindAuthenticationManagerFactory factory = new LdapBindAuthenticationManagerFactory(contextSource); factory.setUserDnPatterns("uid={0},DC=edapt,DC=local"); return factory.createAuthenticationManager(); }

Import spring-security-core, spring-security-web and spring-security-config in build.gradle Attempt to run the app

Environment Information

Windows 11, OpenJDK 17.0.11

Example Application

(https://github.com/HarrisLOGIC/stella)

Version

6.1.1

guruscott-meyer avatar May 28 '24 14:05 guruscott-meyer