spring-projects / spring-security

Spring Security
http://spring.io/projects/spring-security
Apache License 2.0
8.55k stars 5.79k forks source link

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 #15153

Closed guruscott-meyer closed 1 week ago

guruscott-meyer commented 1 month ago

Describe the bug 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

To Reproduce

  1. Create a new grails project with embedded tomcat
  2. Add grails spring security plugins to build.gradle
  3. 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(); }

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

Expected behavior The app should run and connect to Active Directory over LDAP

Sample

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

jzheaux commented 3 weeks ago

Thanks for the report, @guruscott-meyer. Unfortunately, the URL https://github.com/HarrisLOGIC/stella gives me a 404. Do you have an updated sample?

spring-projects-issues commented 2 weeks ago

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-projects-issues commented 1 week ago

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.