Open guruscott-meyer opened 5 months ago
It appears you might be using an incompatible version of the library. I think the class org.springframework.security.web.access.intercept.FilterSecurityInterceptor
is not extending the class javax.servlet.Filter
.
NOTE: The link to example repository seems to be broken.
Correct. Not only has the org.springframework.security.web.access.intercept.FilterSecurityInterceptor class been deprecated for years, it was removed in the latest release.
@guruscott-meyer That is not true. FilterSecurityInterceptor was not removed. It is only deprecated and should be around at least until Spring Security 7 is released which won't for another year from now. ~ November 2025.
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