This commit is contained in:
东皇大叔 2020-05-08 18:33:36 +08:00
parent 25d48b60ce
commit e232ebfcce
24 changed files with 622 additions and 1176 deletions

View File

@ -1,4 +1,5 @@
FROM dockerhub.test.wacai.info/library/tomcat:8.0.41
RUN rm -rf /data/program/tomcat8/webapps/*
COPY cas-server-webapp/src/main/webapp/WEB-INF/cas.properties /data/config/
COPY cas-server-webapp/target/cas.war /data/program/tomcat8/webapps/cas.war

View File

@ -17,26 +17,33 @@
~ specific language governing permissions and limitations
~ under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>com.wacai.loan</groupId>
<artifactId>cas-dev</artifactId>
<version>3.5.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.wacai.loan</groupId>
<artifactId>cas-dev</artifactId>
<version>3.5.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.wacai.loan</groupId>
<artifactId>cas-server-core</artifactId>
<name>Jasig CAS Core</name>
<description>CAS core</description>
<artifactId>cas-server-core</artifactId>
<name>Jasig CAS Core</name>
<description>CAS core</description>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
<type>jar</type>
<scope>compile</scope>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
@ -56,116 +63,85 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.inspektr</groupId>
<artifactId>inspektr-audit</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jasig.service.persondir</groupId>
<artifactId>person-directory-impl</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<scope>test</scope>
<version>3.12.1.GA</version>
</dependency>
<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
@ -178,78 +154,77 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml</artifactId>
<version>2.5.1-1</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</exclusion>
<exclusion>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</exclusion>
</exclusions>
<groupId>org.opensaml</groupId>
<artifactId>opensaml</artifactId>
<version>2.5.1-1</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</exclusion>
<exclusion>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>xmldsig</artifactId>
<version>1.0</version>
<scope>compile</scope>
<groupId>javax.xml</groupId>
<artifactId>xmldsig</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.perf4j</groupId>
<artifactId>perf4j</artifactId>
<version>${perf4j.version}</version>
<classifier>log4jonly</classifier>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>spring-webflow</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-jexl</groupId>
<artifactId>commons-jexl</artifactId>
<scope>runtime</scope>
<type>jar</type>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
<scope>compile</scope>
<type>jar</type>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.opensymphony.quartz</groupId>
<artifactId>quartz</artifactId>
<version>1.6.1</version>
<scope>test</scope>
<type>jar</type>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.inspektr</groupId>
<artifactId>inspektr-support-spring</artifactId>
<scope>test</scope>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.opensymphony.quartz</groupId>
<artifactId>quartz</artifactId>
<version>1.6.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.inspektr</groupId>
<artifactId>inspektr-support-spring</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -24,7 +24,7 @@
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd">
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
<aop:aspectj-autoproxy/>
@ -54,28 +54,28 @@
<constructor-arg index="3">
<map>
<entry key="AUTHENTICATION_RESOLVER">
<ref local="authenticationActionResolver" />
<ref bean="authenticationActionResolver" />
</entry>
<entry key="CREATE_TICKET_GRANTING_TICKET_RESOLVER">
<ref local="ticketCreationActionResolver" />
<ref bean="ticketCreationActionResolver" />
</entry>
<entry key="DESTROY_TICKET_GRANTING_TICKET_RESOLVER">
<bean class="com.github.inspektr.audit.spi.support.DefaultAuditActionResolver" />
</entry>
<entry key="GRANT_SERVICE_TICKET_RESOLVER">
<ref local="ticketCreationActionResolver" />
<ref bean="ticketCreationActionResolver" />
</entry>
<entry key="GRANT_PROXY_GRANTING_TICKET_RESOLVER">
<ref local="ticketCreationActionResolver" />
<ref bean="ticketCreationActionResolver" />
</entry>
<entry key="VALIDATE_SERVICE_TICKET_RESOLVER">
<ref local="ticketValidationActionResolver" />
<ref bean="ticketValidationActionResolver" />
</entry>
<entry key="DELETE_SERVICE_ACTION_RESOLVER">
<ref local="deleteServiceActionResolver" />
<ref bean="deleteServiceActionResolver" />
</entry>
<entry key="SAVE_SERVICE_ACTION_RESOLVER">
<ref local="saveServiceActionResolver" />
<ref bean="saveServiceActionResolver" />
</entry>
</map>
</constructor-arg>
@ -87,25 +87,25 @@
<bean class="org.jasig.cas.audit.spi.CredentialsAsFirstParameterResourceResolver" />
</entry>
<entry key="CREATE_TICKET_GRANTING_TICKET_RESOURCE_RESOLVER">
<ref local="returnValueResourceResolver" />
<ref bean="returnValueResourceResolver" />
</entry>
<entry key="DESTROY_TICKET_GRANTING_TICKET_RESOURCE_RESOLVER">
<ref local="ticketResourceResolver" />
<ref bean="ticketResourceResolver" />
</entry>
<entry key="GRANT_SERVICE_TICKET_RESOURCE_RESOLVER">
<bean class="org.jasig.cas.audit.spi.ServiceResourceResolver" />
</entry>
<entry key="GRANT_PROXY_GRANTING_TICKET_RESOURCE_RESOLVER">
<ref local="returnValueResourceResolver" />
<ref bean="returnValueResourceResolver" />
</entry>
<entry key="VALIDATE_SERVICE_TICKET_RESOURCE_RESOLVER">
<ref local="ticketResourceResolver" />
<ref bean="ticketResourceResolver" />
</entry>
<entry key="DELETE_SERVICE_RESOURCE_RESOLVER">
<ref local="deleteServiceResourceResolver" />
<ref bean="deleteServiceResourceResolver" />
</entry>
<entry key="SAVE_SERVICE_RESOURCE_RESOLVER">
<ref local="saveServiceResourceResolver" />
<ref bean="saveServiceResourceResolver" />
</entry>
</map>
</constructor-arg>

View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to Jasig under one or more contributor license
~ agreements. See the NOTICE file distributed with this work
@ -35,11 +36,16 @@
<artifactId>cas-server-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.12</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -18,12 +18,14 @@
*/
package org.jasig.cas.adaptors.jdbc;
import org.jasig.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandler;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import javax.sql.DataSource;
import javax.validation.constraints.NotNull;
import lombok.AccessLevel;
import lombok.Getter;
import org.springframework.jdbc.core.JdbcTemplate;
import org.jasig.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandler;
/**
* Abstract class for database authentication handlers.
*
@ -31,10 +33,11 @@ import javax.validation.constraints.NotNull;
* @version $Revision$ $Date$
* @since 3.0.3
*/
@Getter(AccessLevel.PROTECTED)
public abstract class AbstractJdbcUsernamePasswordAuthenticationHandler extends AbstractUsernamePasswordAuthenticationHandler {
@NotNull
private SimpleJdbcTemplate jdbcTemplate;
private JdbcTemplate jdbcTemplate;
@NotNull
private DataSource dataSource;
@ -45,20 +48,7 @@ public abstract class AbstractJdbcUsernamePasswordAuthenticationHandler extends
* @param dataSource the datasource to use.
*/
public final void setDataSource(final DataSource dataSource) {
this.jdbcTemplate = new SimpleJdbcTemplate(dataSource);
this.jdbcTemplate = new JdbcTemplate(dataSource);
this.dataSource = dataSource;
}
/**
* Method to return the jdbcTemplate
*
* @return a fully created JdbcTemplate.
*/
protected final SimpleJdbcTemplate getJdbcTemplate() {
return this.jdbcTemplate;
}
protected final DataSource getDataSource() {
return this.dataSource;
}
}

View File

@ -1,271 +1,249 @@
<!--
~ Licensed to Jasig under one or more contributor license
~ agreements. See the NOTICE file distributed with this work
~ for additional information regarding copyright ownership.
~ Jasig 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 the following location:
~
~ 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.
-->
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>com.wacai.loan</groupId>
<artifactId>cas-dev</artifactId>
<version>3.5.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<groupId>com.wacai.loan</groupId>
<artifactId>cas-server-webapp</artifactId>
<packaging>war</packaging>
<name>Jasig CAS Web Application</name>
<packaging>war</packaging>
<name>Jasig CAS Web Application</name>
<dependencies>
<!-- 增加对cas-server-support-jdbc的依赖同时要保证容器下有MySql连接Jar包 -->
<dependency>
<parent>
<groupId>com.wacai.loan</groupId>
<artifactId>cas-server-support-jdbc</artifactId>
<version>${project.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.github.inspektr</groupId>
<artifactId>inspektr-support-spring</artifactId>
<scope>runtime</scope>
</dependency>
<artifactId>cas-dev</artifactId>
<version>3.5.2-SNAPSHOT</version>
</parent>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<scope>compile</scope>
</dependency>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.wacai.loan</groupId>
<artifactId>cas-server-support-jdbc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.inspektr</groupId>
<artifactId>inspektr-support-spring</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-cas</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</dependency>
<dependency>
<groupId>org.jasig.cas.client</groupId>
<artifactId>cas-client-core</artifactId>
<version>3.2.1</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.opensymphony.quartz</groupId>
<artifactId>quartz</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>net.sf.spring-json</groupId>
<artifactId>spring-json</artifactId>
<version>1.3.1</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>net.sf.sojo</groupId>
<artifactId>sojo-optional</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</exclusion>
<exclusion>
<groupId>cglib</groupId>
<artifactId>cglib-full</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>2.2.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.sojo</groupId>
<artifactId>sojo</artifactId>
<version>1.0.5</version>
<exclusions>
<exclusion>
<groupId>commons-attributes</groupId>
<artifactId>commons-attributes-api</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>ognl</groupId>
<artifactId>ognl</artifactId>
<version>2.7.3</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<scope>compile</scope>
</dependency>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warName>cas</warName>
<webResources>
<resource>
<directory>${basedir}/src/main/webapp/WEB-INF</directory>
<filtering>true</filtering>
<targetPath>WEB-INF</targetPath>
<includes>
<include>**/web.xml</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-cas</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</dependency>
<dependency>
<groupId>org.jasig.cas.client</groupId>
<artifactId>cas-client-core</artifactId>
<version>3.2.1</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>${spring.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.opensymphony.quartz</groupId>
<artifactId>quartz</artifactId>
<version>1.6.1</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.sf.spring-json</groupId>
<artifactId>spring-json</artifactId>
<version>1.3.1</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>net.sf.sojo</groupId>
<artifactId>sojo-optional</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</exclusion>
<exclusion>
<groupId>cglib</groupId>
<artifactId>cglib-full</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>2.2.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.sojo</groupId>
<artifactId>sojo</artifactId>
<version>1.0.5</version>
<exclusions>
<exclusion>
<groupId>commons-attributes</groupId>
<artifactId>commons-attributes-api</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>ognl</groupId>
<artifactId>ognl</artifactId>
<version>2.7.3</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warName>cas</warName>
<webResources>
<resource>
<directory>${basedir}/src/main/webapp/WEB-INF</directory>
<filtering>true</filtering>
<targetPath>WEB-INF</targetPath>
<includes>
<include>**/web.xml</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<!--<plugin>-->
<!--<groupId>org.jasig.maven</groupId>-->
<!--<artifactId>maven-translate-plugin</artifactId>-->
<!--<version>0.0.1</version>-->
<!--<executions>-->
<!--<execution>-->
<!--<goals>-->
<!--<goal>check</goal>-->
<!--</goals>-->
<!--<phase>process-resources</phase>-->
<!--</execution>-->
<!--</executions>-->
<!--<configuration>-->
<!--<messagesDirectory>${basedir}/src/main/webapp/WEB-INF/classes/</messagesDirectory>-->
<!--<mainMessagesFile>messages_en.properties</mainMessagesFile>-->
<!--</configuration>-->
<!--</plugin>-->
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.jasig.maven</groupId>
<artifactId>maven-translate-plugin</artifactId>
<versionRange>[0.0.1,)</versionRange>
<goals>
<goal>check</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<!--<plugin>-->
<!--<groupId>org.jasig.maven</groupId>-->
<!--<artifactId>maven-translate-plugin</artifactId>-->
<!--<version>0.0.1</version>-->
<!--<executions>-->
<!--<execution>-->
<!--<goals>-->
<!--<goal>check</goal>-->
<!--</goals>-->
<!--<phase>process-resources</phase>-->
<!--</execution>-->
<!--</executions>-->
<!--<configuration>-->
<!--<messagesDirectory>${basedir}/src/main/webapp/WEB-INF/classes/</messagesDirectory>-->
<!--<mainMessagesFile>messages_en.properties</mainMessagesFile>-->
<!--</configuration>-->
<!--</plugin>-->
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.jasig.maven</groupId>
<artifactId>maven-translate-plugin</artifactId>
<versionRange>[0.0.1,)</versionRange>
<goals>
<goal>check</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@ -127,7 +127,7 @@
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping" p:flowRegistry-ref="flowRegistry"
p:order="2">
<property name="interceptors">
<ref local="localeChangeInterceptor"/>
<ref bean="localeChangeInterceptor"/>
</property>
</bean>
@ -163,7 +163,7 @@
<bean id="viewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator">
<property name="viewResolvers">
<list>
<ref local="viewResolver"/>
<ref bean="viewResolver"/>
</list>
</property>
</bean>

View File

@ -102,4 +102,10 @@ host.name=cas01.example.org
# log4j refresh interval in millis
# log4j.refresh.interval=60000
# JDBC
datasource.url=jdbc:mysql://172.16.68.196/cas?useUnicode=true&characterEncoding=utf8
datasource.username=root
datasource.password=wacai.com
password-query-sql=select password from cas_user where username = ?
password-encode-method=MD5

View File

@ -34,24 +34,20 @@
+-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
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
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:sec="http://www.springframework.org/schema/security"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
http://www.springframework.org/schema/security/spring-security.xsd">
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"
init-method="init"
destroy-method="close">
<property name="url">
<value><![CDATA[jdbc:mysql://172.16.68.196/cas?useUnicode=true&characterEncoding=utf8]]></value>
</property>
<property name="username" value="root" />
<property name="password">
<value><![CDATA[%4MIw0hZ@BUbj@B#Ez&4q(Ez,YS]]></value>
</property>
<property name="url" value="${datasource.url}" />
<property name="username" value="${datasource.username}" />
<property name="password" value="${datasource.password}" />
</bean>
<!--
@ -146,10 +142,10 @@
+-->
<bean class="org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler">
<property name="dataSource" ref="dataSource" />
<property name="sql" value="select password from cas_user where username = ?" />
<property name="sql" value="${password-query-sql}" />
<property name="passwordEncoder">
<bean class="org.jasig.cas.authentication.handler.DefaultPasswordEncoder">
<constructor-arg value="MD5" />
<constructor-arg value="${password-encode-method:MD5}" />
</bean>
</property>
</bean>
@ -157,7 +153,6 @@
</property>
</bean>
<!--
This bean defines the security roles for the Services Management application. Simple deployments can use the in-memory version.
More robust deployments will want to use another option, such as the Jdbc version.

View File

@ -22,8 +22,8 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop"
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">
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
<description>
This is the main Spring configuration file with some of the main "core" classes defined. You shouldn't really
modify this unless you

View File

@ -23,8 +23,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd">
xsi:schemaLocation="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">
<description>
Argument Extractors are what are used to translate HTTP requests into requests of the appropriate protocol (i.e. CAS, SAML, SAML2,
OpenId, etc.). By default CAS and SAML are enabled.

View File

@ -22,8 +22,8 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
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">
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
<description>
Configuration file for the Inspektr package which handles auditing for Java applications.
@ -52,28 +52,28 @@
<constructor-arg index="3">
<map>
<entry key="AUTHENTICATION_RESOLVER">
<ref local="authenticationActionResolver" />
<ref bean="authenticationActionResolver" />
</entry>
<entry key="CREATE_TICKET_GRANTING_TICKET_RESOLVER">
<ref local="ticketCreationActionResolver" />
<ref bean="ticketCreationActionResolver" />
</entry>
<entry key="DESTROY_TICKET_GRANTING_TICKET_RESOLVER">
<bean class="com.github.inspektr.audit.spi.support.DefaultAuditActionResolver" />
</entry>
<entry key="GRANT_SERVICE_TICKET_RESOLVER">
<ref local="ticketCreationActionResolver" />
<ref bean="ticketCreationActionResolver" />
</entry>
<entry key="GRANT_PROXY_GRANTING_TICKET_RESOLVER">
<ref local="ticketCreationActionResolver" />
<ref bean="ticketCreationActionResolver" />
</entry>
<entry key="VALIDATE_SERVICE_TICKET_RESOLVER">
<ref local="ticketValidationActionResolver" />
<ref bean="ticketValidationActionResolver" />
</entry>
<entry key="DELETE_SERVICE_ACTION_RESOLVER">
<ref local="deleteServiceActionResolver" />
<ref bean="deleteServiceActionResolver" />
</entry>
<entry key="SAVE_SERVICE_ACTION_RESOLVER">
<ref local="saveServiceActionResolver" />
<ref bean="saveServiceActionResolver" />
</entry>
</map>
</constructor-arg>
@ -85,25 +85,25 @@
<bean class="org.jasig.cas.audit.spi.CredentialsAsFirstParameterResourceResolver" />
</entry>
<entry key="CREATE_TICKET_GRANTING_TICKET_RESOURCE_RESOLVER">
<ref local="returnValueResourceResolver" />
<ref bean="returnValueResourceResolver" />
</entry>
<entry key="DESTROY_TICKET_GRANTING_TICKET_RESOURCE_RESOLVER">
<ref local="ticketResourceResolver" />
<ref bean="ticketResourceResolver" />
</entry>
<entry key="GRANT_SERVICE_TICKET_RESOURCE_RESOLVER">
<bean class="org.jasig.cas.audit.spi.ServiceResourceResolver" />
</entry>
<entry key="GRANT_PROXY_GRANTING_TICKET_RESOURCE_RESOLVER">
<ref local="returnValueResourceResolver" />
<ref bean="returnValueResourceResolver" />
</entry>
<entry key="VALIDATE_SERVICE_TICKET_RESOURCE_RESOLVER">
<ref local="ticketResourceResolver" />
<ref bean="ticketResourceResolver" />
</entry>
<entry key="DELETE_SERVICE_RESOURCE_RESOLVER">
<ref local="deleteServiceResourceResolver" />
<ref bean="deleteServiceResourceResolver" />
</entry>
<entry key="SAVE_SERVICE_RESOURCE_RESOLVER">
<ref local="saveServiceResourceResolver" />
<ref bean="saveServiceResourceResolver" />
</entry>
</map>
</constructor-arg>

View File

@ -22,7 +22,7 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="characterEncodingFilter" class="org.springframework.web.filter.CharacterEncodingFilter"
p:encoding="UTF-8"
p:forceEncoding="true" />

View File

@ -20,9 +20,9 @@
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<description>
This file lets CAS know where you've stored the cas.properties file which details some of the configuration options
that are specific to your environment. You can specify the location of the file here. You may wish to place the file outside
@ -30,6 +30,7 @@
can be moved between tiers without modification.
</description>
<bean id="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
p:location="/WEB-INF/cas.properties" />
<bean id="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="file:///data/config/cas.properties" />
</bean>
</beans>

View File

@ -23,8 +23,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
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.1.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd">
<description>
Security configuration for services management and other sensitive areas of CAS.

View File

@ -22,7 +22,7 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<description>
Defines the cookie that stores the TicketGrantingTicket. You most likely should never modify these (especially the "secure" property).
You can change the name if you want to make it harder for people to guess.

View File

@ -22,7 +22,7 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<description>
Configuration for the default TicketRegistry which stores the tickets in-memory and cleans them out as specified intervals.
</description>

View File

@ -23,7 +23,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
xsi:schemaLocation="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-3.0.xsd">
<description>
Controls the generation of the unique identifiers for tickets. You most likely do not need to modify these. Though you may need to modify

View File

@ -22,7 +22,7 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<description>
This Spring Configuration file describes the cookie used to store the WARN parameter so that a user is warned whenever the CAS service
is used. You would modify this if you wanted to change the cookie path or the name.

View File

@ -1,106 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to Jasig under one or more contributor license
agreements. See the NOTICE file distributed with this work
for additional information regarding copyright ownership.
Jasig 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 the following location:
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.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
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.1.xsd">
<!-- Credentials Cache implementation -->
<bean id="ehCacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"
p:configLocation="classpath:ehcacheClearPass.xml"
p:shared="false"
p:cacheManagerName="ehCacheClearPassCacheManger"/>
<bean id="clearPassEhCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean"
p:cacheManager-ref="ehCacheManager"
p:cacheName="clearPassCache"/>
<bean id="credentialsCache" class="org.jasig.cas.extension.clearpass.EhcacheBackedMap">
<constructor-arg index="0" ref="clearPassEhCache"/>
</bean>
<!--
NOTE:
Name of delegated ticket registry bean in ticketRegistry.xml must be "ticketRegistryValue."
-->
<bean id="ticketRegistry" class="org.jasig.cas.extension.clearpass.TicketRegistryDecorator">
<constructor-arg index="0" ref="ticketRegistryValue"/>
<constructor-arg index="1" ref="credentialsCache"/>
</bean>
<!-- implementation of the clear pass vending service -->
<bean id="clearPassController" class="org.jasig.cas.extension.clearpass.ClearPassController">
<constructor-arg index="0" ref="credentialsCache"/>
</bean>
<bean id="handlerMappingClearPass" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"
p:alwaysUseFullPath="true">
<property name="mappings">
<props>
<prop key="/clearPass">
clearPassController
</prop>
</props>
</property>
</bean>
<!-- Security configuration -->
<bean id="clearPassFilterChainProxy" class="org.springframework.security.web.FilterChainProxy">
<sec:filter-chain-map request-matcher="ant">
<sec:filter-chain pattern="/clearPass"
filters="casValidationFilter,httpServletRequestWrappingFilter"/>
</sec:filter-chain-map>
</bean>
<!-- NOTE:
It is dangerous to include a non-proxied CAS Filter for protecting /clearPass. Non-proxied CAS Filters
like AuthenticationFilter don't honor the Filter chain proxy protection mechanism and, worse yet, allow access to the
logged on user's cleartext password. It could be useful to enable this bean for easy testing of clearPass functionality however.-->
<!--
<bean id="casAuthenticationFilter" class="org.jasig.cas.client.authentication.AuthenticationFilter">
<property name="casServerLoginUrl" value="${cas.securityContext.casProcessingFilterEntryPoint.loginUrl}"/>
<property name="serverName" value="${server.name}"/>
</bean>
-->
<!--
NOTE:
A bean named clearPassProxyList must be defined in deployerConfigContext.xml that defines
the list of proxying services authorized to obtain clearpass credentials.
-->
<bean id="casValidationFilter" class="org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter">
<property name="serverName" value="${server.name}"/>
<property name="exceptionOnValidationFailure" value="false"/>
<property name="useSession" value="true"/>
<property name="ticketValidator">
<bean class="org.jasig.cas.client.validation.Cas20ProxyTicketValidator">
<constructor-arg index="0" value="${server.prefix}" />
<property name="allowedProxyChains" ref="clearPassProxyList" />
</bean>
</property>
</bean>
<bean id="httpServletRequestWrappingFilter" class="org.jasig.cas.client.util.HttpServletRequestWrapperFilter"/>
</beans>

View File

@ -1,147 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to Jasig under one or more contributor license
agreements. See the NOTICE file distributed with this work
for additional information regarding copyright ownership.
Jasig 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 the following location:
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.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<!--
Sample LPPE-enabled Ldap authentication handler with errors codes defined as a regex pattern.
Each error type will redirect the user to a particular view state defined in the flow.
Unhandled error codes/types will prevent authentication.
Use the bean id below in the main configuration file when you reference the authentication handler bean.
-->
<bean id="lppeEnabledLdapAuthenticationHandler" class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler"
p:filter="${ldap.authentication.filter}"
p:searchBase="${ldap.authentication.basedn}"
p:contextSource-ref="contextSource"
p:searchContextSource-ref="pooledContextSource"
p:ignorePartialResultException="${ldap.authentication.ignorePartialResultException}">
<property name="ldapErrorDefinitions">
<list>
<bean class="org.jasig.cas.adaptors.ldap.LdapErrorDefinition"
p:ldapPattern="data 530"
p:type="badHours" />
<bean class="org.jasig.cas.adaptors.ldap.LdapErrorDefinition"
p:ldapPattern="data 533"
p:type="accountDisabled" />
<bean class="org.jasig.cas.adaptors.ldap.LdapErrorDefinition"
p:ldapPattern="data 773"
p:type="mustChangePassword" />
<bean class="org.jasig.cas.adaptors.ldap.LdapErrorDefinition"
p:ldapPattern="data 775"
p:type="accountLocked" />
<bean class="org.jasig.cas.adaptors.ldap.LdapErrorDefinition"
p:ldapPattern="data 531"
p:type="badWorkstation" />
<bean class="org.jasig.cas.adaptors.ldap.LdapErrorDefinition"
p:ldapPattern="data (701|532)"
p:type="passwordExpired" />
</list>
</property>
</bean>
<!--
Configuration beans that are required for LDAP authentication.
LDAP settings may be defined inside the 'cas.properties' file.
In addition to the CAS LDAP module, Apache Common Pool may also be declared as a
dependency inside the pom.
See here for additional information: https://wiki.jasig.org/display/CASUM/LDAP
-->
<bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource">
<property name="pooled" value="false"/>
<property name="urls">
<bean class="org.springframework.util.StringUtils" factory-method="commaDelimitedListToSet">
<constructor-arg type="java.lang.String" value="${ldap.authentication.server.urls}"/>
</bean>
</property>
<property name="userDn" value="${ldap.authentication.manager.userdn}"/>
<property name="password" value="${ldap.authentication.manager.password}"/>
<property name="baseEnvironmentProperties">
<map>
<entry key="com.sun.jndi.ldap.connect.timeout" value="${ldap.authentication.jndi.connect.timeout}" />
<entry key="com.sun.jndi.ldap.read.timeout" value="${ldap.authentication.jndi.read.timeout}" />
<entry key="java.naming.security.authentication" value="${ldap.authentication.jndi.security.level}" />
</map>
</property>
</bean>
<bean id="dirContextValidator"
class="org.springframework.ldap.pool.validation.DefaultDirContextValidator"
p:base=""
p:filter="objectclass=*">
<property name="searchControls">
<bean class="javax.naming.directory.SearchControls"
p:timeLimit="1000"
p:countLimit="1"
p:searchScope="0"
p:returningAttributes="" />
</property>
</bean>
<bean id="pooledContextSource"
class="org.springframework.ldap.pool.factory.PoolingContextSource"
p:minIdle="${ldap.authentication.pool.minIdle}"
p:maxIdle="${ldap.authentication.pool.maxIdle}"
p:maxActive="${ldap.authentication.pool.maxSize}"
p:maxWait="${ldap.authentication.pool.maxWait}"
p:timeBetweenEvictionRunsMillis="${ldap.authentication.pool.evictionPeriod}"
p:minEvictableIdleTimeMillis="${ldap.authentication.pool.idleTime}"
p:testOnBorrow="${ldap.authentication.pool.testOnBorrow}"
p:testWhileIdle="${ldap.authentication.pool.testWhileIdle}"
p:dirContextValidator-ref="dirContextValidator"
p:contextSource-ref="contextSource" />
<bean id="passwordPolicyAction" class="org.jasig.cas.web.flow.PasswordPolicyEnforcementAction">
<property name="passwordPolicyEnforcer" ref="ldapPasswordPolicyEnforcer" />
<property name="passwordPolicyUrl" value="${ldap.authentication.lppe.password.url}" />
</bean>
<!--
This bean defines the current implementation of the password policy enforcer for ldap.
The properties defined below would possibly exist inside the local 'cas.properties' file
-->
<bean id="ldapPasswordPolicyEnforcer" class="org.jasig.cas.adaptors.ldap.LdapPasswordPolicyEnforcer">
<property name="searchBase" value="${ldap.authentication.basedn}" />
<property name="contextSource" ref="contextSource" />
<property name="filter" value="${ldap.authentication.filter}" />
<property name="ignorePartialResultException" value="${ldap.authentication.ignorePartialResultException}" />
<property name="warnAll" value="${ldap.authentication.lppe.warnAll}" />
<property name="dateFormat" value="${ldap.authentication.lppe.dateFormat}" />
<property name="dateAttribute" value="${ldap.authentication.lppe.dateAttribute}" />
<property name="warningDaysAttribute" value="${ldap.authentication.lppe.warningDaysAttribute}" />
<property name="validDaysAttribute" value="${ldap.authentication.lppe.validDaysAttribute}" />
<property name="warningDays" value="${ldap.authentication.lppe.warningDays}" />
<property name="validDays" value="${ldap.authentication.lppe.validDays}" />
<property name="noWarnAttribute" value="${ldap.authentication.lppe.noWarnAttribute}" />
<property name="noWarnValues" value="${ldap.authentication.lppe.noWarnValues}" />
</bean>
</beans>

View File

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to Jasig under one or more contributor license
agreements. See the NOTICE file distributed with this work
for additional information regarding copyright ownership.
Jasig 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 the following location:
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.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<description>
Configuration for the MBeans to support JMX.
</description>
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
<property name="assembler" ref="assembler"/>
<property name="namingStrategy" ref="namingStrategy"/>
<property name="autodetect" value="true"/>
</bean>
<bean id="jmxAttributeSource" class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource"/>
<!-- will create management interface using annotation metadata -->
<bean id="assembler"
class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler">
<property name="attributeSource" ref="jmxAttributeSource"/>
</bean>
<!-- will pick up the ObjectName from the annotation -->
<bean id="namingStrategy"
class="org.springframework.jmx.export.naming.MetadataNamingStrategy">
<property name="attributeSource" ref="jmxAttributeSource"/>
</bean>
<bean id="reloadbleServicesManagerMBean" class="org.jasig.cas.services.jmx.ReloadableServicesManagerMBean">
<constructor-arg index="0" ref="servicesManager" />
</bean>
</beans>

View File

@ -23,7 +23,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:webflow="http://www.springframework.org/schema/webflow-config"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd">
<bean id="jsonView" class="org.springframework.web.servlet.view.json.JsonView" />

632
pom.xml
View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.wacai.loan</groupId>
@ -15,351 +15,76 @@
<url>http://www.jasig.org/cas/</url>
<inceptionYear>2004</inceptionYear>
<parent>
<groupId>org.jasig.parent</groupId>
<artifactId>jasig-parent</artifactId>
<version>34</version>
</parent>
<properties>
<issues.projectKey>CAS</issues.projectKey>
<spring.webflow.version>2.3.0.RELEASE</spring.webflow.version>
<spring.version>3.1.1.RELEASE</spring.version>
<spring.ldap.version>1.3.1.RELEASE</spring.ldap.version>
<spring.security.version>3.1.0.RELEASE</spring.security.version>
<clover.version>2.6.3</clover.version>
<aspectj.version>1.8.10</aspectj.version>
<javax.validation.version>1.0.0.GA</javax.validation.version>
<perf4j.version>0.9.14</perf4j.version>
<commons.jexl.version>1.1</commons.jexl.version>
<hibernate.validator.version>4.2.0.Final</hibernate.validator.version>
<hibernate.core.version>4.1.0.Final</hibernate.core.version>
<slf4j.version>1.7.1</slf4j.version>
<person.directory.version>1.5.1</person.directory.version>
<servlet.api.version>2.5</servlet.api.version>
<jpa.version>2.0-cr-1</jpa.version>
<commons.codec.version>1.4</commons.codec.version>
<log4j.version>1.2.15</log4j.version>
<junit.version>4.10</junit.version>
<commons.lang.version>2.5</commons.lang.version>
<inspektr.version>1.0.7.GA</inspektr.version>
<commons.io.version>2.0</commons.io.version>
<mockito.version>1.9.0</mockito.version>
<jdk.version>1.8</jdk.version>
<ehcache.version>2.6.0</ehcache.version>
<hsqldb.version>2.0.0</hsqldb.version>
<joda-time.version>2.1</joda-time.version>
</properties>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>${basedir}/src/test/resources</directory>
</testResource>
</testResources>
<modules>
<module>cas-server-core</module>
<module>cas-server-webapp</module>
<module>cas-server-support-jdbc</module>
</modules>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<forkMode>once</forkMode>
<includes>
<include>**/*Tests.java</include>
</includes>
<excludes>
<exclude>**/Abstract*.java</exclude>
</excludes>
<additionalClasspathElements>
<additionalClasspathElement>${project.build.directory}/test-lib/jdbc-driver.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>2.0.9</version>
</requireMavenVersion>
<requireJavaVersion>
<version>${jdk.version}</version>
</requireJavaVersion>
<bannedDependencies>
<excludes>
<exclude>cglib:cglib</exclude>
<exclude>cglib:cglib-full</exclude>
</excludes>
<includes>
<include>cglib:cglib:provided</include>
<include>cglib:cglib-full:provided</include>
</includes>
<searchTransitive>true</searchTransitive>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<!--
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2 lugin</artifactId>
<version>${clover.version}</version>
<configuration>
<license><![CDATA[oPpoNpLipDQKHHXaIXJPCIsoqRpdAfeXwIImkDIRoTnriq
mi2KuXZFGad>>Lz0ULLXhqIo2KPjARsdren1aP3vzebzkM
qNNNUvQNpqopPoOQRqmTvqoPnOnMopRPqpSUtxrWTxOxTu
pTSqrOnmqmUUnopqmvummmmmmUUnopqmvummmmmmUUA1jJ
97W9kZkUUnmm]]></license>
<jdk>${jdk.version}</jdk>
<generateXml>true</generateXml>
<generateHtml>true</generateHtml>
<includes>
<include>**/*.java</include>
</includes>
<excludes>
<exclude>**/CasVersion.java</exclude>
<exclude>
**/SamlCompliantUniqueTicketIdGenerator.java
</exclude>
</excludes>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>instrument</goal>
</goals>
</execution>
</executions>
</plugin>-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<descriptors>
<descriptor>${basedir}/assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
<!--
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<source>1.6</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<mavenExecutorId>forked-path</mavenExecutorId>
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>
<!-- CAS-988 generate hashes for assembly artifacts -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.5</version>
<configuration>
<target>
<ant antfile="tasks.xml" target="genhash" />
</target>
</configuration>
</plugin>
<plugin>
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
<configuration>
<header>src/licensing/header.txt</header>
<headerDefinitions>
<headerDefinition>src/licensing/header-definitions.xml</headerDefinition>
</headerDefinitions>
<aggregate>true</aggregate>
<excludes>
<exclude>LICENSE</exclude>
<exclude>**/INSTALL*</exclude>
<exclude>**/NOTICE*</exclude>
<exclude>**/README*</exclude>
<exclude>**/readme*</exclude>
<exclude>**/*.log</exclude>
<exclude>**/*.license</exclude>
<exclude>**/*.txt</exclude>
<exclude>**/*.crt</exclude>
<exclude>**/*.crl</exclude>
<exclude>**/*.key</exclude>
<exclude>**/.gitignore</exclude>
<exclude>**/.eclipse/**</exclude>
<exclude>**/.idea/**</exclude>
<exclude>**/overlays/**</exclude>
<exclude>src/licensing/**</exclude>
<exclude>**/testCA/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<scope>compile</scope>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<scope>compile</scope>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>${javax.validation.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
<scope>runtime</scope>
<type>jar</type>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>jasig-repository</id>
<name>Jasig Maven2 Repository</name>
<url>http://developer.ja-sig.org/maven2</url>
</repository>
<repository>
<id>jboss</id>
<name>JBoss Repository</name>
<layout>default</layout>
<url>http://repository.jboss.org/nexus/content/groups/public-jboss/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>mojo-snapshot</id>
<name>Codehause Mojo Snapshot Repository</name>
<url>https://nexus.codehaus.org/content/repositories/codehaus-snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commons.lang.version}</version>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
<version>${ehcache.version}</version>
</dependency>
<!-- Inspektr Dependencies -->
<dependency>
<groupId>com.github.inspektr</groupId>
<artifactId>inspektr-audit</artifactId>
<version>${inspektr.version}</version>
</dependency>
<dependency>
<groupId>com.github.inspektr</groupId>
<artifactId>inspektr-common</artifactId>
<version>${inspektr.version}</version>
</dependency>
<dependency>
<groupId>com.github.inspektr</groupId>
<artifactId>inspektr-support-spring</artifactId>
<version>${inspektr.version}</version>
</dependency>
<dependency>
<groupId>commons-jexl</groupId>
<artifactId>commons-jexl</artifactId>
@ -371,7 +96,6 @@ pTSqrOnmqmUUnopqmvummmmmmUUnopqmvummmmmmUUA1jJ
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jasig.service.persondir</groupId>
<artifactId>person-directory-impl</artifactId>
@ -383,43 +107,31 @@ pTSqrOnmqmUUnopqmvummmmmmUUnopqmvummmmmmUUA1jJ
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons.codec.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.core.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.core.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>${hibernate.core.version}</version>
<scope>compile</scope>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.hibernate.java-persistence</groupId>
<artifactId>jpa-api</artifactId>
<version>${jpa.version}</version>
<scope>compile</scope>
</dependency>
<!-- Spring Security Managed Dependencies -->
<dependency>
<groupId>org.springframework.security</groupId>
@ -432,19 +144,16 @@ pTSqrOnmqmUUnopqmvummmmmmUUnopqmvummmmmmUUA1jJ
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
@ -456,7 +165,6 @@ pTSqrOnmqmUUnopqmvummmmmmUUnopqmvummmmmmUUA1jJ
</exclusion>
</exclusions>
</dependency>
<!-- Spring Managed Dependencies -->
<dependency>
<groupId>org.springframework</groupId>
@ -468,7 +176,6 @@ pTSqrOnmqmUUnopqmvummmmmmUUnopqmvummmmmmUUA1jJ
<artifactId>spring-aspects</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
@ -520,7 +227,6 @@ pTSqrOnmqmUUnopqmvummmmmmUUnopqmvummmmmmUUA1jJ
<artifactId>spring-oxm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
@ -561,12 +267,10 @@ pTSqrOnmqmUUnopqmvummmmmmUUnopqmvummmmmmUUA1jJ
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.ldap</groupId>
<artifactId>spring-ldap-core-tiger</artifactId>
<version>${spring.ldap.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -574,7 +278,6 @@ pTSqrOnmqmUUnopqmvummmmmmUUnopqmvummmmmmUUA1jJ
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.ldap</groupId>
<artifactId>spring-ldap-core</artifactId>
@ -586,37 +289,31 @@ pTSqrOnmqmUUnopqmvummmmmmUUnopqmvummmmmmUUA1jJ
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet.api.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate.validator.version}</version>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>${hsqldb.version}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
@ -625,80 +322,183 @@ pTSqrOnmqmUUnopqmvummmmmmUUnopqmvummmmmmUUA1jJ
</dependencies>
</dependencyManagement>
<modules>
<module>cas-server-core</module>
<module>cas-server-webapp</module>
<module>cas-server-support-jdbc</module>
</modules>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>${basedir}/src/test/resources</directory>
</testResource>
</testResources>
<profiles>
<profile>
<id>ci</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8</version>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<forkMode>once</forkMode>
<includes>
<include>**/*Tests.java</include>
</includes>
<excludes>
<exclude>**/Abstract*.java</exclude>
</excludes>
<additionalClasspathElements>
<additionalClasspathElement>${project.build.directory}/test-lib/jdbc-driver.jar
</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<charset>UTF-8</charset>
<encoding>UTF-8</encoding>
<docencoding>UTF-8</docencoding>
<rules>
<requireMavenVersion>
<version>2.0.9</version>
</requireMavenVersion>
<requireJavaVersion>
<version>${jdk.version}</version>
</requireJavaVersion>
<bannedDependencies>
<excludes>
<exclude>cglib:cglib</exclude>
<exclude>cglib:cglib-full</exclude>
</excludes>
<includes>
<include>cglib:cglib:provided</include>
<include>cglib:cglib-full:provided</include>
</includes>
<searchTransitive>true</searchTransitive>
</bannedDependencies>
</rules>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<descriptors>
<descriptor>${basedir}/assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<mavenExecutorId>forked-path</mavenExecutorId>
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>
<!-- CAS-988 generate hashes for assembly artifacts -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.5</version>
<configuration>
<target>
<ant antfile="tasks.xml" target="genhash"/>
</target>
</configuration>
</plugin>
<plugin>
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
<configuration>
<header>src/licensing/header.txt</header>
<headerDefinitions>
<headerDefinition>src/licensing/header-definitions.xml</headerDefinition>
</headerDefinitions>
<aggregate>true</aggregate>
<excludes>
<exclude>LICENSE</exclude>
<exclude>**/INSTALL*</exclude>
<exclude>**/NOTICE*</exclude>
<exclude>**/README*</exclude>
<exclude>**/readme*</exclude>
<exclude>**/*.log</exclude>
<exclude>**/*.license</exclude>
<exclude>**/*.txt</exclude>
<exclude>**/*.crt</exclude>
<exclude>**/*.crl</exclude>
<exclude>**/*.key</exclude>
<exclude>**/.gitignore</exclude>
<exclude>**/.eclipse/**</exclude>
<exclude>**/.idea/**</exclude>
<exclude>**/overlays/**</exclude>
<exclude>src/licensing/**</exclude>
<exclude>**/testCA/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>jasig-repository</id>
<name>Jasig Maven2 Repository</name>
<url>http://developer.ja-sig.org/maven2</url>
</repository>
<repository>
<id>jboss</id>
<name>JBoss Repository</name>
<layout>default</layout>
<url>http://repository.jboss.org/nexus/content/groups/public-jboss/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>mojo-snapshot</id>
<name>Codehause Mojo Snapshot Repository</name>
<url>https://nexus.codehaus.org/content/repositories/codehaus-snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<properties>
<issues.projectKey>CAS</issues.projectKey>
<spring.webflow.version>2.3.0.RELEASE</spring.webflow.version>
<spring.version>3.1.1.RELEASE</spring.version>
<spring.ldap.version>1.3.1.RELEASE</spring.ldap.version>
<spring.security.version>3.1.0.RELEASE</spring.security.version>
<clover.version>2.6.3</clover.version>
<aspectj.version>1.8.10</aspectj.version>
<javax.validation.version>1.0.0.GA</javax.validation.version>
<perf4j.version>0.9.14</perf4j.version>
<commons.jexl.version>1.1</commons.jexl.version>
<hibernate.validator.version>4.2.0.Final</hibernate.validator.version>
<hibernate.core.version>4.1.0.Final</hibernate.core.version>
<slf4j.version>1.7.1</slf4j.version>
<person.directory.version>1.5.1</person.directory.version>
<servlet.api.version>2.5</servlet.api.version>
<jpa.version>2.0-cr-1</jpa.version>
<commons.codec.version>1.4</commons.codec.version>
<log4j.version>1.2.15</log4j.version>
<junit.version>4.10</junit.version>
<commons.lang.version>2.5</commons.lang.version>
<inspektr.version>1.0.7.GA</inspektr.version>
<commons.io.version>2.0</commons.io.version>
<mockito.version>1.9.0</mockito.version>
<jdk.version>1.8</jdk.version>
<ehcache.version>2.6.0</ehcache.version>
<hsqldb.version>2.0.0</hsqldb.version>
<joda-time.version>2.1</joda-time.version>
</properties>
</project>