permaculture playing cards*
The moose likes Spring and the fly likes Spring Security 2.0.4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring Security 2.0.4" Watch "Spring Security 2.0.4" New topic
Author

Spring Security 2.0.4

Shak Smith
Greenhorn

Joined: Feb 19, 2010
Posts: 12
Hello guys,
I'm playing with Spring Security 2.0.4 in Spring 2.5. Basically I just want to authenticate users using LDAP.
My configuration is like this:


But in eclipse I get the following error
No setter found for property 'userDn' in class 'org.springframework.security.ldap.DefaultSpringSecurityContextSource'
No setter found for property 'password' in class 'org.springframework.security.ldap.DefaultSpringSecurityContextSource'

I'm wondering why is that happening. In the spring security's page seems to work in that way.
http://static.springsource.org/spring-security/site/docs/2.0.x/reference/ldap.html


How am I supposed to configure DefaultSpringSecurityContextSource to work?
How can I set the admin and the password if they are not available in the DefaultSpringSecurityContextSource ??

Thanks for your help on this.

JUST REALIZE THAT I HAD TO ADD THIS TO THE MAVEN POM (Besides the spring security).
<dependency>
<groupId>org.springframework.ldap</groupId>
<artifactId>spring-ldap-core</artifactId>
<version>1.3.0.RELEASE</version>
</dependency>

Peter Mularien
Author
Ranch Hand

Joined: Sep 06, 2007
Posts: 84
Hi Shak,

You might find it easier to configure LDAP authentication (and Spr Sec itself) using the security namespace support instead of creating beans yourself. It's quite easy, especially for newcomers, to miss a critical bean or bean property when manually wiring the Spr Sec beans.

Peter


Author, Spring Security 3 (the Book), Packt Publishing, 2010
SCJP, OCP
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Spring Security 2.0.4
 
Similar Threads
java.util.MissingResourceException: Can't find bundle for base name in JSF Spring Maven project
Spring 3.0.2 and Active MQ 5.4.1 Issues
Spring Major version '3' expected
Richfaces + Spring + Maven Setup help
[Spring Security] No bean named 'springSecurityFilterChain' is defined