Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
guruscott-meyer opened this issue May 28, 2024 · 3 comments

Comments

@guruscott-meyer
Copy link

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

@puneetbehl
Copy link
Contributor

puneetbehl commented May 28, 2024

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.

@guruscott-meyer
Copy link
Author

Correct. Not only has the org.springframework.security.web.access.intercept.FilterSecurityInterceptor class been deprecated for years, it was removed in the latest release.

@codeconsole
Copy link
Contributor

codeconsole commented Oct 31, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants