|
From: Jean-François H. <jho...@gm...> - 2010-09-15 07:25:47
|
Hello, I have a webapp containing 4 features. Each feature is
protected by a specific role.
The roles are stored in a MySQL data base. (I use the users and
authorities schema as describes by the spring doc).
All of this work actually quiet well.
Here is my actual spring configuration for the security:
<security:http auto-config="true"
access-denied-page="/accessDenied.jsp">
<security:intercept-url pattern="/ChangeLanguage.action" filters="none"/>
<security:intercept-url pattern="/Login.action" filters="none"/>
<security:intercept-url pattern="/Start.action" access="ROLE_LIST,
ROLE_HERK, ROLE_CONF, ROLE_IMPORT" />
<security:intercept-url pattern="/List.action" access="ROLE_LIST" />
<security:intercept-url pattern="/Herkenning.action" access="ROLE_HERK" />
<security:intercept-url pattern="/Confrontatie.action" access="ROLE_CONF" />
<security:intercept-url pattern="/Importeren.action" access="ROLE_IMPORT" />
<security:intercept-url pattern="/list/**" access="ROLE_LIST" />
<security:intercept-url pattern="/herkenning/**" access="ROLE_HERK" />
<security:intercept-url pattern="/confrontatie/**" access="ROLE_CONF" />
<security:intercept-url pattern="/importeren/**" access="ROLE_IMPORT" />
<security:intercept-url pattern="/**/EditDetails.action" access="ROLE_EDIT" />
<security:intercept-url pattern="/**/Delete.action" access="ROLE_DELETE" />
<security:form-login login-page="/Login.action"
authentication-failure-url="/Login.action?login_error=true"
default-target-url="/Start.action" always-use-default-target="true"/>
</security:http>
<bean id="userDetailsService" class="com.steria.security.MyJdbcDaoImpl">
...
</bean>
<security:authentication-provider user-service-ref="userDetailsService">
<security:password-encoder hash="md5"/>
</security:authentication-provider>
Now I would like to add an anonymous acces to the website. In fact I
would like to specify in my database various ROLE for the anonymus
user.
For example, I would like to set in my data base the ROLE_LIST to the
anonymous user, so that he can acces the List.action page without any
login.
Can someone help me to do that? Thanks!
Regards,
Jean-François Houzard
|