From 9b8cc1f9affcd2ff1a34af7395de2088c0ae6cf3 Mon Sep 17 00:00:00 2001
From: Daniel Gerhardt <daniel.gerhardt@mni.thm.de>
Date: Sat, 9 Aug 2014 23:08:50 +0200
Subject: [PATCH] Remove obsolete security XML config

---
 .../webapp/WEB-INF/spring/spring-main.xml     |   2 -
 .../webapp/WEB-INF/spring/spring-security.xml | 163 ------------------
 2 files changed, 165 deletions(-)
 delete mode 100644 src/main/webapp/WEB-INF/spring/spring-security.xml

diff --git a/src/main/webapp/WEB-INF/spring/spring-main.xml b/src/main/webapp/WEB-INF/spring/spring-main.xml
index d37792995..b9bedd607 100644
--- a/src/main/webapp/WEB-INF/spring/spring-main.xml
+++ b/src/main/webapp/WEB-INF/spring/spring-main.xml
@@ -23,8 +23,6 @@
 		<property name="fileEncoding" value="UTF-8" />
 	</bean>
 
-	<import resource="spring-security.xml" />
-
 	<context:component-scan base-package="de.thm.arsnova.dao,de.thm.arsnova.events,de.thm.arsnova.security,de.thm.arsnova.services,de.thm.arsnova.config" />
 
 	<context:annotation-config />
diff --git a/src/main/webapp/WEB-INF/spring/spring-security.xml b/src/main/webapp/WEB-INF/spring/spring-security.xml
deleted file mode 100644
index 0d843b17b..000000000
--- a/src/main/webapp/WEB-INF/spring/spring-security.xml
+++ /dev/null
@@ -1,163 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:security="http://www.springframework.org/schema/security"
-	xmlns:context="http://www.springframework.org/schema/context"
-	xmlns:p="http://www.springframework.org/schema/p"
-	xsi:schemaLocation="http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd
-		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
-		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd
-		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
-
-	<security:authentication-manager alias="authenticationManager">
-		<!-- <security:ldap-authentication-provider
-			user-search-filter="${security.ldap.user-search-filter}"
-			user-search-base="${security.ldap.user-search-base}" />
-			-->
-		<security:ldap-authentication-provider user-dn-pattern="${security.ldap.user-dn-pattern}" />
-		<security:authentication-provider ref="facebookAuthProvider" />
-		<security:authentication-provider ref="twitterAuthProvider" />
-		<security:authentication-provider ref="googleAuthProvider" />
-		<security:authentication-provider ref="casAuthenticationProvider" />
-		<security:authentication-provider ref="daoAuthenticationProvider" />
-	</security:authentication-manager>
-
-	<security:http entry-point-ref="restLoginEntryPoint">
-		<security:custom-filter ref="facebookFilter" before="CAS_FILTER" />
-		<security:custom-filter ref="twitterFilter" after="CAS_FILTER" />
-		<security:custom-filter ref="googleFilter" before="FORM_LOGIN_FILTER" />
-		<security:custom-filter ref="casAuthenticationFilter" position="CAS_FILTER" />
-		<security:custom-filter ref="requestSingleLogoutFilter" before="LOGOUT_FILTER" />
-	</security:http>
-
-	<!-- ######################### DB auth ############################# -->
-	<bean id="daoAuthenticationProvider"
-			class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
-		<property name="userDetailsService" ref="dbUserDetailsService" />
-		<property name="passwordEncoder" ref="passwordEncoder" />
-	</bean>
-	
-	<bean id="passwordEncoder" class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder" />
-
-	<!-- ######################### LDAP ############################# -->
-	<security:ldap-server url="${security.ldap.url}" />
-	<!-- <security:ldap-server ldif="classpath:/test.ldif" root="dc=example,dc=com" /> -->
-	
-	<bean id="restLoginEntryPoint" class="org.springframework.security.web.authentication.Http403ForbiddenEntryPoint" />
-
-	<bean id="loginUrlAuthenticationEntryPoint"
-		class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint">
-		<property name="loginFormUrl" value="/login.html" />
-		<property name="forceHttps" value="false" />
-	</bean>
-
-	<!-- ######################### FACEBOOK ######################### -->
-	<bean id="facebookEntryPoint" class="com.github.leleuj.ss.oauth.client.web.OAuthAuthenticationEntryPoint"
-		p:provider-ref="facebookProvider" />
-
-	<bean id="facebookProvider" class="org.scribe.up.provider.impl.FacebookProvider"
-		p:key="${security.facebook.key}"
-		p:secret="${security.facebook.secret}"
-		p:callbackUrl="${root-url}#{servletContext.contextPath}/j_spring_facebook_security_check" />
-
-	<bean id="facebookFilter" class="com.github.leleuj.ss.oauth.client.web.OAuthAuthenticationFilter"
-		p:filterProcessesUrl="/j_spring_facebook_security_check"
-		p:provider-ref="facebookProvider"
-		p:authenticationManager-ref="authenticationManager"
-		p:authenticationFailureHandler-ref="failureHandler"
-		p:authenticationSuccessHandler-ref="successHandler" />
-
-	<bean id="facebookAuthProvider" class="com.github.leleuj.ss.oauth.client.authentication.OAuthAuthenticationProvider"
-		p:provider-ref="facebookProvider" />
-
-	<!-- ######################### TWITTER ######################### -->
-	<bean id="twitterProvider" class="org.scribe.up.provider.impl.TwitterProvider"
-		p:key="${security.twitter.key}"
-		p:secret="${security.twitter.secret}"
-		p:callbackUrl="${root-url}#{servletContext.contextPath}/j_spring_twitter_security_check" />
-
-	<bean id="twitterFilter" class="com.github.leleuj.ss.oauth.client.web.OAuthAuthenticationFilter"
-		p:filterProcessesUrl="/j_spring_twitter_security_check"
-		p:provider-ref="twitterProvider"
-		p:authenticationManager-ref="authenticationManager"
-		p:authenticationFailureHandler-ref="failureHandler"
-		p:authenticationSuccessHandler-ref="successHandler" />
-
-	<bean id="twitterAuthProvider" class="com.github.leleuj.ss.oauth.client.authentication.OAuthAuthenticationProvider"
-		p:provider-ref="twitterProvider" />
-
-	<!-- ######################### GOOGLE ######################### -->
-	<bean id="googleProvider" class="org.scribe.up.provider.impl.Google2Provider"
-		p:key="${security.google.key}"
-		p:secret="${security.google.secret}"
-		p:scope-ref="googleScope"
-		p:callbackUrl="${root-url}#{servletContext.contextPath}/j_spring_google_security_check" />
-	
-	<bean id="googleScope" class="org.scribe.up.provider.impl.Google2Provider.Google2Scope" factory-method="valueOf">
-		<constructor-arg index="0" value="EMAIL" />
-	</bean>
-
-	<bean id="googleFilter"
-		class="com.github.leleuj.ss.oauth.client.web.OAuthAuthenticationFilter"
-		p:filterProcessesUrl="/j_spring_google_security_check" p:provider-ref="googleProvider"
-		p:authenticationManager-ref="authenticationManager"
-		p:authenticationFailureHandler-ref="failureHandler"
-		p:authenticationSuccessHandler-ref="successHandler" />
-
-	<bean id="googleAuthProvider"
-		class="com.github.leleuj.ss.oauth.client.authentication.OAuthAuthenticationProvider"
-		p:provider-ref="googleProvider" />
-
-	<!-- ######################### CAS ######################### -->
-	<bean id="casAuthenticationFilter"
-		class="org.springframework.security.cas.web.CasAuthenticationFilter"
-		p:authenticationManager-ref="authenticationManager"
-		p:authenticationFailureHandler-ref="failureHandler"
-		p:authenticationSuccessHandler-ref="successHandler" />
-
-	<bean id="casEntryPoint"
-		class="org.springframework.security.cas.web.CasAuthenticationEntryPoint"
-		p:loginUrl="${security.cas-server-url}/login"
-		p:serviceProperties-ref="casServiceProperties" />
-	
-	<bean id="casServiceProperties" 
-		class="org.springframework.security.cas.ServiceProperties"
-		p:service="${root-url}#{servletContext.contextPath}/j_spring_cas_security_check"
-		p:sendRenew="false" />
-
-	<bean id="casAuthenticationProvider"
-		class="org.springframework.security.cas.authentication.CasAuthenticationProvider"
-		p:key="casAuthProviderKey" p:serviceProperties-ref="casServiceProperties"
-		p:authenticationUserDetailsService-ref="casUserDetailsService"
-		p:ticketValidator-ref="casTicketValidator" />
-
-	<bean id="casUserDetailsService" class="de.thm.arsnova.CasUserDetailsService" />
-	<bean id="casTicketValidator"
-		class="org.jasig.cas.client.validation.Cas20ProxyTicketValidator">
-		<constructor-arg value="${security.cas-server-url}" />
-	</bean>
-
-	<bean id="requestSingleLogoutFilter"
-		class="org.springframework.security.web.authentication.logout.LogoutFilter"
-		p:filterProcessesUrl="/j_spring_cas_security_logout">
-		<constructor-arg ref="casLogoutSuccessHandler" />
-		<constructor-arg>
-			<bean
-				class="org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler" />
-		</constructor-arg>
-	</bean>
-
-	<bean id="casLogoutSuccessHandler" class="de.thm.arsnova.CASLogoutSuccessHandler"
-		p:casUrl="${security.cas-server-url}"
-		p:defaultTarget="${root-url}"/>
-	
-	<bean id="successHandler" class="de.thm.arsnova.LoginAuthenticationSucessHandler"
-		p:targetUrl="${root-url}"/>
-
-	<bean id="failureHandler" class="de.thm.arsnova.LoginAuthenticationFailureHandler"
-		p:defaultFailureUrl="${root-url}" />
-
-	<!-- Session Registry -->
-	<bean id="sessionRegistry"
-		class="org.springframework.security.core.session.SessionRegistryImpl" />
-</beans>
-- 
GitLab