While implementing spring security with my GWT based web application. I found that. Everything is working fine as expected, except the below fact:
I opened login.jsp and given my valid user login credentials. after submitting, it successfully redirecting to home page. Now when I am editing the URL to login.jsp in the Address bar... surprisingly it is allowing to open my login.jsp but as far my understanding.. it should not allow to go back to login.jsp untill & unless I am logged-in.
May be my security-context.xml file is not correctly configured.
Below is my security-application-context.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- - Sample namespace-based configuration - -->
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
<global-method-security secured-annotations="enabled">
</global-method-security>
<beans:bean id="customAuthenticationProcessingFilter"
class="edu.authentication.CustomAuthenticationProcessingFilter">
<custom-filter position="AUTHENTICATION_PROCESSING_FILTER" />
<beans:property name="defaultTargetUrl" value="/Home.html?gwt.codesvr=127.0.0.1:9997" />
<beans:property name="authenticationFailureUrl" value="/login.jsp?login_error=1" />
<beans:property name="authenticationManager" ref="authenticationManager" />
</beans:bean>
<beans:bean id="authenticationProcessingFilterEntryPoint"
class="org.springframework.security.ui.webapp.AuthenticationProcessingFilterEntryPoint">
<beans:property name="loginFormUrl" value="/login.jsp" />
<beans:property name="forceHttps" value="false" />
</beans:bean>
<beans:bean id="customUserDetailsService"
class="edu.authentication.CustomUserDetailsService">
<beans:property name="urmService" ref="urmService" />
</beans:bean>
<http auto-config="false" entry-point-ref="authenticationProcessingFilterEntryPoint">
<intercept-url pattern="/login.jsp*" filters="none" />
<intercept-url pattern="/forgot_password.jsp*" filters="none" />
<intercept-url pattern="/forgotPasswordServlet.do*" filters="none" />
<intercept-url pattern="/myApp/**" access="IS_AUTHENTICATED_FULLY"/>
<intercept-url pattern="/gwt/**" access="IS_AUTHENTICATED_FULLY"/>
<intercept-url pattern="/*.html" access="IS_AUTHENTICATED_FULLY"/>
<logout logout-url="/j_spring_security_logout"
invalidate-session="true" logout-success-url="/login.jsp?loggedout=true"/>
</http>
<authentication-manager alias="authenticationManager" />
<authentication-provider user-service-ref="customUserDetailsService">
<password-encoder hash="md5" />
</authentication-provider>
</beans:beans>
Any help/suggestions would be highly appriciable..