
Originally Posted by
Marten Deinum
Unless you want to have a security hole in your application (adding the username/password as request parameters is a security hole).
If I'm right (And I'm not an expert in security), at a time or another, the username/password has to be sent to the server, isn't it? Maybe that way is not the best, but due time/poor of knowledge about it and because for an intranet of few computer, we don't need better security.
Thanks for answer, setting me on a way to resolve the problem. What you said (UsernamePasswordAuthenticationFilter) is something I already read. If you have more sample/information about how to do that, it will good.
I add my actual xml files config
secu.xml
Code:
<http realm="NexCap Up"
auto-config="true"
access-denied-page="/www/jsp/authentication/accessDenied.jsp"
create-session="always"
disable-url-rewriting="true">
<port-mappings>
<port-mapping http="8084" https="8443"/>
</port-mappings>
<intercept-url pattern="/www/jsp/authentication/connexion.jsp"
access='IS_AUTHENTICATED_ANONYMOUSLY' requires-channel="https"/>
<intercept-url pattern="/www/jsp/authentication/connexionFailed.jsp"
access='IS_AUTHENTICATED_ANONYMOUSLY' />
<intercept-url pattern="/www/jsp/authentication/applicationExit.jsp"
access='IS_AUTHENTICATED_ANONYMOUSLY' />
<intercept-url
pattern="/get.Request"
method="GET"
access="ROLE_REMOTE" />
<intercept-url
pattern="/post.Request"
method="POST"
access="ROLE_REMOTE" />
<intercept-url pattern="/**"
access="ROLE_REMOTE,ROLE_SCRIPT" />
<form-login
authentication-failure-url="/www/jsp/authentication/connexionFailed.jsp"
login-page="/www/jsp/authentication/connexion.jsp"
default-target-url="/www/jsp/index.jsp"
always-use-default-target="true"/>
<logout
logout-success-url="/www/jsp/authentication/applicationExit.jsp"
invalidate-session="true"/>
<session-management
invalid-session-url="/www/jsp/authentication/invalidSession.jsp"
session-authentication-error-url = "/www/jsp/authentication/authentificationError.jsp"
session-fixation-protection="none">
<!-- Sessions concurrentes -->
<concurrency-control
error-if-maximum-exceeded="false"
expired-url="/www/jsp/authentication/sessionExpired.jsp"
max-sessions="1" />
</session-management>
</http>
web.xml
Code:
<security-constraint>
<web-resource-collection>
<web-resource-name>Security</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<filter>
<display-name>springSecurityFilterChain</display-name>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>
org.springframework.web.filter.DelegatingFilterProxy
</filter-class>
</filter>
<!-- Toutes les requetes soumises au filtre -->
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--Fichier de configuration de contexte sécurité -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring/secu-config.xml
</param-value>
</context-param>
THANKS