You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by sm...@apache.org on 2016/03/17 23:33:05 UTC
directory-fortress-commander git commit: FC-159 - Upgrade to Spring
Version 4
Repository: directory-fortress-commander
Updated Branches:
refs/heads/master 3ad90f904 -> 874ca3755
FC-159 - Upgrade to Spring Version 4
Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/commit/874ca375
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/tree/874ca375
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/diff/874ca375
Branch: refs/heads/master
Commit: 874ca3755601963c86b467398789ddbf281a6be9
Parents: 3ad90f9
Author: Shawn McKinney <sm...@apache.org>
Authored: Thu Mar 17 17:32:54 2016 -0500
Committer: Shawn McKinney <sm...@apache.org>
Committed: Thu Mar 17 17:32:54 2016 -0500
----------------------------------------------------------------------
pom.xml | 39 ++++--------
src/main/resources/applicationContext.xml | 84 +++++++++-----------------
2 files changed, 39 insertions(+), 84 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/874ca375/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4b13ab4..83ef5c0 100755
--- a/pom.xml
+++ b/pom.xml
@@ -96,19 +96,12 @@
<title>${project.name} ${project.version}</title>
<fortress.realm.version>1.0-RC42-SNAPSHOT</fortress.realm.version>
<wicket.version>6.19.0</wicket.version>
-
<wicket.jquery.version>6.15.0</wicket.jquery.version>
<wicket.kendo-ui.version>6.15.0</wicket.kendo-ui.version>
-
-<!--
- <wicket.jquery.version>6.19.0</wicket.jquery.version>
- <wicket.kendo-ui.version>6.19.0</wicket.kendo-ui.version>
--->
-
<version.log4j>1.2.17</version.log4j>
<version.slf4j.log4j12>1.7.7</version.slf4j.log4j12>
- <spring.version>3.2.3.RELEASE</spring.version>
- <spring.security.version>3.1.4.RELEASE</spring.security.version>
+ <spring.version>4.2.5.RELEASE</spring.version>
+ <spring.security.version>4.0.4.RELEASE</spring.security.version>
<javadoc.version>2.9.1</javadoc.version>
<jetty.version>8.1.8.v20121106</jetty.version>
<jetty.stopKey>stopJetty</jetty.stopKey>
@@ -144,13 +137,6 @@
<scope>provided</scope>
</dependency>
- <!-- JETTY used for embedded testing within intellij -->
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty</artifactId>
- <version>6.1.25</version>
- </dependency>
-
<!-- Wicket, Spring and other Web UI framework tools -->
<dependency>
<groupId>org.apache.wicket</groupId>
@@ -170,14 +156,6 @@
<version>${wicket.version}</version>
</dependency>
-<!--
- <dependency>
- <groupId>org.apache.wicket</groupId>
- <artifactId>wicket-auth-roles</artifactId>
- <version>${wicket.version}</version>
- </dependency>
--->
-
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-datetime</artifactId>
@@ -255,7 +233,7 @@
<artifactId>spring-security-web</artifactId>
<version>${spring.security.version}</version>
</dependency>
-
+
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
@@ -292,8 +270,15 @@
<artifactId>ant-launcher</artifactId>
<version>1.8.1</version>
</dependency>
-
- <!-- JETTY DEPENDENCIES FOR TESTING -->
+
+ <!-- JETTY used for embedded testing -->
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.25</version>
+ <scope>test</scope>
+ </dependency>
+
<dependency>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-all-server</artifactId>
http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/874ca375/src/main/resources/applicationContext.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/applicationContext.xml b/src/main/resources/applicationContext.xml
index 6c9df01..9fd72f8 100644
--- a/src/main/resources/applicationContext.xml
+++ b/src/main/resources/applicationContext.xml
@@ -1,35 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
+ ~ This is free and unencumbered software released into the public domain.
+ -->
<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"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/util
- http://www.springframework.org/schema/util/spring-util-3.0.xsd
- http://www.springframework.org/schema/security
- http://www.springframework.org/schema/security/spring-security.xsd">
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd
+ http://www.springframework.org/schema/security
+ http://www.springframework.org/schema/security/spring-security.xsd">
<!-- Housekeeping -->
<bean id="baseURL" class="java.lang.String">
@@ -87,7 +71,6 @@
factory-method="createInstance">
</bean>
-
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject">
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
@@ -98,7 +81,7 @@
<property name="targetMethod" value="putAll"/>
<property name="arguments">
<util:properties>
- <prop key="version">1.0-RC39</prop>
+ <prop key="version">1.0-RC42-SNAPSHOT</prop>
</util:properties>
</property>
</bean>
@@ -106,29 +89,24 @@
<!-- Inject spring context into wicket pages -->
<bean id="wicketApplication" class="org.apache.directory.fortress.web.ApplicationContext"></bean>
- <!-- setup spring security using preauthenticated (java ee) strategy -->
+ <!-- setup spring security using pre-authenticated (Java EE) strategy -->
<bean id="filterChainProxy" class="org.springframework.security.web.FilterChainProxy">
- <sec:filter-chain-map path-type="ant">
- <sec:filter-chain pattern="/**" filters="sif,j2eePreAuthFilter,logoutFilter,etf,fsi"/>
- </sec:filter-chain-map>
+ <constructor-arg>
+ <list>
+ <sec:filter-chain pattern="/**" filters="sif,j2eePreAuthFilter,logoutFilter,etf,fsi" />
+ </list>
+ </constructor-arg>
</bean>
<bean id="sif" class="org.springframework.security.web.context.SecurityContextPersistenceFilter"/>
-
<sec:authentication-manager alias="authenticationManager">
<sec:authentication-provider ref='preAuthenticatedAuthenticationProvider'/>
</sec:authentication-manager>
-
- <bean id="preAuthenticatedAuthenticationProvider"
- class="org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationProvider">
+ <bean id="preAuthenticatedAuthenticationProvider" class="org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationProvider">
<property name="preAuthenticatedUserDetailsService" ref="preAuthenticatedUserDetailsService"/>
</bean>
-
- <bean id="preAuthenticatedUserDetailsService"
- class="org.springframework.security.web.authentication.preauth.PreAuthenticatedGrantedAuthoritiesUserDetailsService"/>
-
- <bean id="j2eePreAuthFilter"
- class="org.springframework.security.web.authentication.preauth.j2ee.J2eePreAuthenticatedProcessingFilter">
+ <bean id="preAuthenticatedUserDetailsService" class="org.springframework.security.web.authentication.preauth.PreAuthenticatedGrantedAuthoritiesUserDetailsService"/>
+ <bean id="j2eePreAuthFilter" class="org.springframework.security.web.authentication.preauth.j2ee.J2eePreAuthenticatedProcessingFilter">
<property name="authenticationManager" ref="authenticationManager"/>
<property name="authenticationDetailsSource">
<bean class="org.springframework.security.web.authentication.preauth.j2ee.J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource">
@@ -143,10 +121,7 @@
</bean>
</property>
</bean>
-
- <bean id="preAuthenticatedProcessingFilterEntryPoint"
- class="org.springframework.security.web.authentication.Http403ForbiddenEntryPoint"/>
-
+ <bean id="preAuthenticatedProcessingFilterEntryPoint" class="org.springframework.security.web.authentication.Http403ForbiddenEntryPoint"/>
<bean id="logoutFilter" class="org.springframework.security.web.authentication.logout.LogoutFilter">
<constructor-arg value="/"/>
<constructor-arg>
@@ -156,26 +131,25 @@
</constructor-arg>
</bean>
- <bean id="servletContext" class="org.springframework.web.context.support.ServletContextFactoryBean"/>
+ <!-- <bean id="servletContext" class="org.springframework.web.context.support.ServletContextFactoryBean"/> -->
<bean id="etf" class="org.springframework.security.web.access.ExceptionTranslationFilter">
- <property name="authenticationEntryPoint" ref="preAuthenticatedProcessingFilterEntryPoint"/>
+ <constructor-arg ref="preAuthenticatedProcessingFilterEntryPoint"/>
</bean>
<bean id="httpRequestAccessDecisionManager" class="org.springframework.security.access.vote.AffirmativeBased">
- <property name="allowIfAllAbstainDecisions" value="false"/>
- <property name="decisionVoters">
+ <constructor-arg>
<list>
<ref bean="roleVoter"/>
</list>
- </property>
+ </constructor-arg>
</bean>
<bean id="fsi" class="org.springframework.security.web.access.intercept.FilterSecurityInterceptor">
<property name="authenticationManager" ref="authenticationManager"/>
<property name="accessDecisionManager" ref="httpRequestAccessDecisionManager"/>
<property name="securityMetadataSource">
- <sec:filter-invocation-definition-source>
+ <sec:filter-security-metadata-source use-expressions="false">
<!-- before spring interceptor recognizes these roles, the j2ee preauthentication filter requires prior declaration in web.xml -->
<sec:intercept-url pattern="/wicket/bookmarkable/org.apache.directory.fortress.web.userpage"
access="ROLE_RBAC_ADMIN,ROLE_USERS"/>
@@ -209,13 +183,9 @@
access="ROLE_RBAC_ADMIN,ROLE_AUDIT_BINDS"/>
<sec:intercept-url pattern="/wicket/bookmarkable/org.apache.directory.fortress.web.grouppage"
access="ROLE_RBAC_ADMIN,ROLE_GROUPS"/>
- </sec:filter-invocation-definition-source>
+ </sec:filter-security-metadata-source>
</property>
</bean>
-
<bean id="roleVoter" class="org.springframework.security.access.vote.RoleVoter"/>
-
- <bean id="securityContextHolderAwareRequestFilter"
- class="org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter"/>
-
+ <bean id="securityContextHolderAwareRequestFilter" class="org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter"/>
</beans>