File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Spring Security Not intercepting the request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring Security Not intercepting the request" Watch "Spring Security Not intercepting the request" New topic
Author

Spring Security Not intercepting the request

Rithanya Laxmi
Ranch Hand

Joined: Jan 24, 2011
Posts: 135
Hi,

My application doesnot have a GUI, where I need to implement Spring LDAP security for AD authentication. Since I dont have a GUI I am using Spring security basic authentication and in the authentication manager i am calling the ldapAuthProvider for Spring LDAP validation. Below is what I am doing:-


<http auto-config="true" pattern="/**" authentication-manager-ref="authenticationManager">
<http:basic/>

</http>

<beans:bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager">
<beans:property name="providers">
<beans:list>
<beans:ref local="ldapAuthProvider"/>
</beans:list>
</beans:property>
</beans:bean>

// Configuration for LDAP


Here when I invoke the URL, which is given as "/**" the request is not intercepted by SpringLDAP ?

In web.xml I have the below:-


<context-param>
<description>Spring Configuration Locations</description>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/applicationContext.xml</param-value>
</context-param>

<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>

<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>


<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
</listener>


Please clarify why the request is not getting intercepted by spring security?


Thanks.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring Security Not intercepting the request
 
Similar Threads
javax.servlet.ServletException: No adapter for handler
spring security 3.1 destroys existing session with active user logged in
Spring LDAP/Active Directory Security: Authenticate User w/out Using an Admin/Mgr Account
“j_spring_security_check” not found after configuring spring security without http namespace
RichFaces + Spring Security -- Problem Load RichFaces