dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16304
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6179: Upgraded to Spring Security 3.1, everything should function as before. Please test and report any...
------------------------------------------------------------
revno: 6179
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-03-05 15:43:22 +0100
message:
Upgraded to Spring Security 3.1, everything should function as before. Please test and report any errors directly to me.
modified:
dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/security.xml
dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/vote/AbstractPrefixedAccessDecisionVoter.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/vote/SimpleAccessVoter.java
dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml
dhis-2/pom.xml
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2012-02-20 12:22:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2012-03-05 14:43:22 +0000
@@ -4,7 +4,7 @@
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
-http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
+http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<!-- Store definitions -->
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/security.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/security.xml 2011-12-28 06:38:22 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/security.xml 2012-03-05 14:43:22 +0000
@@ -2,7 +2,7 @@
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sec="http://www.springframework.org/schema/security"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.Md5PasswordEncoder" />
<bean id="usernameSaltSource" class="org.hisp.dhis.security.DefaultUsernameSaltSource" />
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml 2012-01-24 13:28:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml 2012-03-05 14:43:22 +0000
@@ -6,7 +6,7 @@
xmlns:sec="http://www.springframework.org/schema/security"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<sec:global-method-security pre-post-annotations="enabled" />
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/vote/AbstractPrefixedAccessDecisionVoter.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/vote/AbstractPrefixedAccessDecisionVoter.java 2011-12-28 06:38:22 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/vote/AbstractPrefixedAccessDecisionVoter.java 2012-03-05 14:43:22 +0000
@@ -37,7 +37,7 @@
* @version $Id: AbstractPrefixedAccessDecisionVoter.java 3160 2007-03-24 20:15:06Z torgeilo $
*/
public abstract class AbstractPrefixedAccessDecisionVoter
- implements AccessDecisionVoter
+ implements AccessDecisionVoter<Object>
{
private static final Log LOG = LogFactory.getLog( AbstractPrefixedAccessDecisionVoter.class );
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/vote/SimpleAccessVoter.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/vote/SimpleAccessVoter.java 2011-12-28 06:38:22 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/vote/SimpleAccessVoter.java 2012-03-05 14:43:22 +0000
@@ -45,7 +45,7 @@
* @version $Id: SimpleAccessVoter.java 6352 2008-11-20 15:49:52Z larshelg $
*/
public class SimpleAccessVoter
- implements AccessDecisionVoter
+ implements AccessDecisionVoter<Object>
{
private static final Log LOG = LogFactory.getLog( SimpleAccessVoter.class );
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml 2012-03-05 12:23:01 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml 2012-03-05 14:43:22 +0000
@@ -3,7 +3,7 @@
xmlns:sec="http://www.springframework.org/schema/security"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<!-- Web Portal -->
@@ -318,7 +318,7 @@
<!-- Common actions -->
<bean id="org.hisp.dhis.commons.action.GetNotificationsAction" class="org.hisp.dhis.commons.action.GetNotificationsAction" scope="prototype">
- <property name="notifier" ref="notifier" />
+ <property name="notifier" ref="notifier" />
</bean>
<bean id="org.hisp.dhis.commons.action.GetUserAction" class="org.hisp.dhis.commons.action.GetUserAction" scope="prototype">
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2011-12-28 06:38:22 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2012-03-05 14:43:22 +0000
@@ -2,7 +2,7 @@
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:sec="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="mappedRedirectStrategy" class="org.hisp.dhis.security.MappedRedirectStrategy">
@@ -23,6 +23,10 @@
<property name="redirectStrategy" ref="mappedRedirectStrategy" />
</bean>
+ <sec:http pattern="/dhis-web-commons/javascripts/**" security="none" />
+ <sec:http pattern="/dhis-web-commons/css/**" security="none" />
+ <sec:http pattern="/favicon.ico" security="none" />
+
<sec:http access-decision-manager-ref="accessDecisionManager" use-expressions="true" realm="DHIS2">
<sec:form-login default-target-url="/" always-use-default-target="false"
login-processing-url="/dhis-web-commons-security/login.action"
@@ -31,16 +35,8 @@
authentication-success-handler-ref="defaultAuthenticationSuccessHandler" />
<sec:http-basic />
<sec:logout logout-url="/dhis-web-commons-security/logout.action" />
- <sec:intercept-url pattern="/dhis-web-commons/security/**" access="permitAll" />
- <sec:intercept-url pattern="/dhis-web-commons/javascripts/**" filters="none" />
- <sec:intercept-url pattern="/dhis-web-commons/css/**" filters="none" />
- <sec:intercept-url pattern="/favicon.ico" filters="none" />
- <!--
- <sec:intercept-url pattern="/api*" access="hasRole('F_WEBAPI_READ')" />
- <sec:intercept-url pattern="/api/**" access="hasRole('F_WEBAPI_READ')" />
- -->
+ <sec:intercept-url pattern="/dhis-web-commons/security/**" access="permitAll()" />
<sec:intercept-url pattern="/**" access="isAuthenticated()" />
-
<sec:custom-filter ref="automaticAccessFilter" before="LOGOUT_FILTER" />
</sec:http>
@@ -85,38 +81,46 @@
<property name="systemAuthoritiesProvider" ref="simpleSystemAuthoritiesProvider" />
</bean>
- <!-- Security : AccessDecion/Voter -->
+ <!-- Security : AccessDecision/Voter -->
<bean id="accessDecisionManager" class="org.hisp.dhis.security.vote.LogicalOrAccessDecisionManager">
<property name="accessDecisionManagers">
<list>
<ref local="adminAccessDecisionVoting" />
<ref local="regularAccessDecisionVoting" />
+ <ref local="webAccessDecisionVoting" />
</list>
</property>
</bean>
<bean id="adminAccessDecisionVoting" class="org.springframework.security.access.vote.UnanimousBased">
- <property name="decisionVoters">
+ <constructor-arg name="decisionVoters">
<list>
<ref local="adminAccessVoter" />
</list>
- </property>
+ </constructor-arg>
</bean>
<bean id="adminAccessVoter" class="org.hisp.dhis.security.vote.SimpleAccessVoter">
<property name="requiredAuthority" value="ALL" />
</bean>
+ <bean id="webAccessDecisionVoting" class="org.springframework.security.access.vote.UnanimousBased">
+ <constructor-arg name="decisionVoters">
+ <list>
+ <ref local="webExpressionVoter" />
+ </list>
+ </constructor-arg>
+ </bean>
+
<bean id="regularAccessDecisionVoting" class="org.springframework.security.access.vote.UnanimousBased">
- <property name="decisionVoters">
+ <constructor-arg name="decisionVoters">
<list>
<ref local="actionAccessVoter" />
<ref local="moduleAccessVoter" />
<ref local="authenticatedVoter" />
- <ref local="webExpressionVoter" />
</list>
- </property>
+ </constructor-arg>
</bean>
<bean id="authenticatedVoter" class="org.springframework.security.access.vote.AuthenticatedVoter" />
=== modified file 'dhis-2/pom.xml'
--- dhis-2/pom.xml 2012-02-20 12:01:56 +0000
+++ dhis-2/pom.xml 2012-03-05 14:43:22 +0000
@@ -777,7 +777,7 @@
<rootDir></rootDir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>3.1.0.RELEASE</spring.version>
- <spring.security.version>3.0.7.RELEASE</spring.security.version>
+ <spring.security.version>3.1.0.RELEASE</spring.security.version>
<hibernate.version>3.6.9.Final</hibernate.version>
</properties>
</project>