mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-23 12:32:13 +00:00
SEC-514: Refactoring contacts sample into single webapp.
This commit is contained in:
parent
a499e74102
commit
fe4bbe0fbf
@ -13,12 +13,65 @@
|
|||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.acegisecurity</groupId>
|
||||||
|
<artifactId>acegi-security</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-webmvc</artifactId>
|
||||||
|
<version>${spring.version}</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>servlet-api</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
<version>2.4</version>
|
<version>2.4</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.ehcache</groupId>
|
||||||
|
<artifactId>ehcache</artifactId>
|
||||||
|
<version>1.2.4</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>hessian</groupId>
|
||||||
|
<artifactId>hessian</artifactId>
|
||||||
|
<version>3.0.1</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>hsqldb</groupId>
|
||||||
|
<artifactId>hsqldb</artifactId>
|
||||||
|
<version>1.8.0.4</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jstl</groupId>
|
||||||
|
<artifactId>jstl</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>taglibs</groupId>
|
||||||
|
<artifactId>standard</artifactId>
|
||||||
|
<version>1.0.6</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-ldap</artifactId>
|
||||||
|
<version>1.1.2</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-mock</artifactId>
|
||||||
|
<version>${spring.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@ -26,8 +79,17 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.mortbay.jetty</groupId>
|
||||||
|
<artifactId>maven-jetty-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<webXml>src/main/webapp/filter/WEB-INF/web.xml</webXml>
|
<contextPath>/contacts</contextPath>
|
||||||
|
<!--jettyConfig>${basedir}/src/test/resources/jetty.xml</jettyConfig-->
|
||||||
|
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||||
|
<!--scanTargets>
|
||||||
|
<scanTarget>src/main/webapp/css</scanTarget>
|
||||||
|
</scanTargets-->
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
@ -22,14 +22,17 @@
|
|||||||
<!-- ~~~~~~~~~~~~~~~~~~ "BEFORE INVOCATION" AUTHORIZATION DEFINITIONS ~~~~~~~~~~~~~~~~ -->
|
<!-- ~~~~~~~~~~~~~~~~~~ "BEFORE INVOCATION" AUTHORIZATION DEFINITIONS ~~~~~~~~~~~~~~~~ -->
|
||||||
|
|
||||||
<!-- ACL permission masks used by this application -->
|
<!-- ACL permission masks used by this application -->
|
||||||
<bean id="org.acegisecurity.acls.domain.BasePermission.ADMINISTRATION" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
|
<bean id="org.acegisecurity.acls.domain.BasePermission.ADMINISTRATION"
|
||||||
<property name="staticField"><value>org.acegisecurity.acls.domain.BasePermission.ADMINISTRATION</value></property>
|
class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
|
||||||
|
<property name="staticField" value="org.acegisecurity.acls.domain.BasePermission.ADMINISTRATION"/>
|
||||||
</bean>
|
</bean>
|
||||||
<bean id="org.acegisecurity.acls.domain.BasePermission.READ" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
|
<bean id="org.acegisecurity.acls.domain.BasePermission.READ"
|
||||||
<property name="staticField"><value>org.acegisecurity.acls.domain.BasePermission.READ</value></property>
|
class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
|
||||||
|
<property name="staticField" value="org.acegisecurity.acls.domain.BasePermission.READ"/>
|
||||||
</bean>
|
</bean>
|
||||||
<bean id="org.acegisecurity.acls.domain.BasePermission.DELETE" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
|
<bean id="org.acegisecurity.acls.domain.BasePermission.DELETE"
|
||||||
<property name="staticField"><value>org.acegisecurity.acls.domain.BasePermission.DELETE</value></property>
|
class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
|
||||||
|
<property name="staticField" value="org.acegisecurity.acls.domain.BasePermission.DELETE"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
|
||||||
@ -38,57 +41,45 @@
|
|||||||
|
|
||||||
<!-- An access decision voter that reads ACL_CONTACT_READ configuration settings -->
|
<!-- An access decision voter that reads ACL_CONTACT_READ configuration settings -->
|
||||||
<bean id="aclContactReadVoter" class="org.acegisecurity.vote.AclEntryVoter">
|
<bean id="aclContactReadVoter" class="org.acegisecurity.vote.AclEntryVoter">
|
||||||
<constructor-arg>
|
<constructor-arg ref="aclService"/>
|
||||||
<ref bean="aclService"/>
|
<constructor-arg value="ACL_CONTACT_READ"/>
|
||||||
</constructor-arg>
|
|
||||||
<constructor-arg>
|
|
||||||
<value>ACL_CONTACT_READ</value>
|
|
||||||
</constructor-arg>
|
|
||||||
<constructor-arg>
|
<constructor-arg>
|
||||||
<list>
|
<list>
|
||||||
<ref local="org.acegisecurity.acls.domain.BasePermission.ADMINISTRATION"/>
|
<ref local="org.acegisecurity.acls.domain.BasePermission.ADMINISTRATION"/>
|
||||||
<ref local="org.acegisecurity.acls.domain.BasePermission.READ"/>
|
<ref local="org.acegisecurity.acls.domain.BasePermission.READ"/>
|
||||||
</list>
|
</list>
|
||||||
</constructor-arg>
|
</constructor-arg>
|
||||||
<property name="processDomainObjectClass"><value>sample.contact.Contact</value></property>
|
<property name="processDomainObjectClass" value="sample.contact.Contact"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- An access decision voter that reads ACL_CONTACT_DELETE configuration settings -->
|
<!-- An access decision voter that reads ACL_CONTACT_DELETE configuration settings -->
|
||||||
<bean id="aclContactDeleteVoter" class="org.acegisecurity.vote.AclEntryVoter">
|
<bean id="aclContactDeleteVoter" class="org.acegisecurity.vote.AclEntryVoter">
|
||||||
<constructor-arg>
|
<constructor-arg ref="aclService"/>
|
||||||
<ref bean="aclService"/>
|
<constructor-arg value="ACL_CONTACT_DELETE"/>
|
||||||
</constructor-arg>
|
|
||||||
<constructor-arg>
|
|
||||||
<value>ACL_CONTACT_DELETE</value>
|
|
||||||
</constructor-arg>
|
|
||||||
<constructor-arg>
|
<constructor-arg>
|
||||||
<list>
|
<list>
|
||||||
<ref local="org.acegisecurity.acls.domain.BasePermission.ADMINISTRATION"/>
|
<ref local="org.acegisecurity.acls.domain.BasePermission.ADMINISTRATION"/>
|
||||||
<ref local="org.acegisecurity.acls.domain.BasePermission.DELETE"/>
|
<ref local="org.acegisecurity.acls.domain.BasePermission.DELETE"/>
|
||||||
</list>
|
</list>
|
||||||
</constructor-arg>
|
</constructor-arg>
|
||||||
<property name="processDomainObjectClass"><value>sample.contact.Contact</value></property>
|
<property name="processDomainObjectClass" value="sample.contact.Contact"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- An access decision voter that reads ACL_CONTACT_ADMIN configuration settings -->
|
<!-- An access decision voter that reads ACL_CONTACT_ADMIN configuration settings -->
|
||||||
<bean id="aclContactAdminVoter" class="org.acegisecurity.vote.AclEntryVoter">
|
<bean id="aclContactAdminVoter" class="org.acegisecurity.vote.AclEntryVoter">
|
||||||
<constructor-arg>
|
<constructor-arg ref="aclService"/>
|
||||||
<ref bean="aclService"/>
|
<constructor-arg value="ACL_CONTACT_ADMIN"/>
|
||||||
</constructor-arg>
|
|
||||||
<constructor-arg>
|
|
||||||
<value>ACL_CONTACT_ADMIN</value>
|
|
||||||
</constructor-arg>
|
|
||||||
<constructor-arg>
|
<constructor-arg>
|
||||||
<list>
|
<list>
|
||||||
<ref local="org.acegisecurity.acls.domain.BasePermission.ADMINISTRATION"/>
|
<ref local="org.acegisecurity.acls.domain.BasePermission.ADMINISTRATION"/>
|
||||||
</list>
|
</list>
|
||||||
</constructor-arg>
|
</constructor-arg>
|
||||||
<property name="processDomainObjectClass"><value>sample.contact.Contact</value></property>
|
<property name="processDomainObjectClass" value="sample.contact.Contact"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- An access decision manager used by the business objects -->
|
<!-- An access decision manager used by the business objects -->
|
||||||
<bean id="businessAccessDecisionManager" class="org.acegisecurity.vote.AffirmativeBased">
|
<bean id="businessAccessDecisionManager" class="org.acegisecurity.vote.AffirmativeBased">
|
||||||
<property name="allowIfAllAbstainDecisions"><value>false</value></property>
|
<property name="allowIfAllAbstainDecisions" value="false"/>
|
||||||
<property name="decisionVoters">
|
<property name="decisionVoters">
|
||||||
<list>
|
<list>
|
||||||
<ref local="roleVoter"/>
|
<ref local="roleVoter"/>
|
||||||
@ -107,9 +98,7 @@
|
|||||||
<property name="cacheManager">
|
<property name="cacheManager">
|
||||||
<bean class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"/>
|
<bean class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="cacheName">
|
<property name="cacheName" value="aclCache"/>
|
||||||
<value>aclCache</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
</bean>
|
||||||
</constructor-arg>
|
</constructor-arg>
|
||||||
</bean>
|
</bean>
|
||||||
@ -157,7 +146,8 @@
|
|||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- Processes AFTER_ACL_COLLECTION_READ configuration settings -->
|
<!-- Processes AFTER_ACL_COLLECTION_READ configuration settings -->
|
||||||
<bean id="afterAclCollectionRead" class="org.acegisecurity.afterinvocation.AclEntryAfterInvocationCollectionFilteringProvider">
|
<bean id="afterAclCollectionRead"
|
||||||
|
class="org.acegisecurity.afterinvocation.AclEntryAfterInvocationCollectionFilteringProvider">
|
||||||
<constructor-arg>
|
<constructor-arg>
|
||||||
<ref bean="aclService"/>
|
<ref bean="aclService"/>
|
||||||
</constructor-arg>
|
</constructor-arg>
|
||||||
@ -195,9 +185,13 @@
|
|||||||
to the Contact presented as a method argument.
|
to the Contact presented as a method argument.
|
||||||
-->
|
-->
|
||||||
<bean id="contactManagerSecurity" class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
|
<bean id="contactManagerSecurity" class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
|
||||||
<property name="authenticationManager"><ref bean="authenticationManager"/></property>
|
<property name="authenticationManager" ref="authenticationManager"/>
|
||||||
<property name="accessDecisionManager"><ref local="businessAccessDecisionManager"/></property>
|
<property name="accessDecisionManager">
|
||||||
<property name="afterInvocationManager"><ref local="afterInvocationManager"/></property>
|
<ref local="businessAccessDecisionManager"/>
|
||||||
|
</property>
|
||||||
|
<property name="afterInvocationManager">
|
||||||
|
<ref local="afterInvocationManager"/>
|
||||||
|
</property>
|
||||||
<property name="objectDefinitionSource">
|
<property name="objectDefinitionSource">
|
||||||
<value>
|
<value>
|
||||||
sample.contact.ContactManager.create=ROLE_USER
|
sample.contact.ContactManager.create=ROLE_USER
|
||||||
|
@ -12,19 +12,10 @@
|
|||||||
<beans>
|
<beans>
|
||||||
|
|
||||||
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
|
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
|
||||||
<property name="driverClassName">
|
<property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
|
||||||
<value>org.hsqldb.jdbcDriver</value>
|
<property name="url" value="jdbc:hsqldb:mem:test"/> <!-- <value>jdbc:hsqldb:hsql://localhost/acl</value> -->
|
||||||
</property>
|
<property name="username" value="sa"/>
|
||||||
<property name="url">
|
<property name="password" value=""/>
|
||||||
<value>jdbc:hsqldb:mem:test</value>
|
|
||||||
<!-- <value>jdbc:hsqldb:hsql://localhost/acl</value> -->
|
|
||||||
</property>
|
|
||||||
<property name="username">
|
|
||||||
<value>sa</value>
|
|
||||||
</property>
|
|
||||||
<property name="password">
|
|
||||||
<value></value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
||||||
@ -32,7 +23,7 @@
|
|||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
<bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||||
<property name="transactionManager"><ref bean="transactionManager"/></property>
|
<property name="transactionManager"><ref local="transactionManager"/></property>
|
||||||
<property name="transactionAttributeSource">
|
<property name="transactionAttributeSource">
|
||||||
<value>
|
<value>
|
||||||
sample.contact.ContactManager.create=PROPAGATION_REQUIRED
|
sample.contact.ContactManager.create=PROPAGATION_REQUIRED
|
||||||
@ -52,12 +43,8 @@
|
|||||||
<property name="platformTransactionManager" ref="transactionManager"/>
|
<property name="platformTransactionManager" ref="transactionManager"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="contactDao" class="sample.contact.ContactDaoSpring">
|
|
||||||
<property name="dataSource"><ref local="dataSource"/></property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="contactManager" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="contactManager" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
<property name="proxyInterfaces"><value>sample.contact.ContactManager</value></property>
|
<property name="proxyInterfaces" value="sample.contact.ContactManager"/>
|
||||||
<property name="interceptorNames">
|
<property name="interceptorNames">
|
||||||
<list>
|
<list>
|
||||||
<idref local="transactionInterceptor"/>
|
<idref local="transactionInterceptor"/>
|
||||||
@ -68,8 +55,12 @@
|
|||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="contactManagerTarget" class="sample.contact.ContactManagerBackend">
|
<bean id="contactManagerTarget" class="sample.contact.ContactManagerBackend">
|
||||||
<property name="contactDao"><ref local="contactDao"/></property>
|
<property name="contactDao">
|
||||||
<property name="mutableAclService"><ref bean="aclService"/></property>
|
<bean class="sample.contact.ContactDaoSpring">
|
||||||
|
<property name="dataSource"><ref local="dataSource"/></property>
|
||||||
|
</bean>
|
||||||
|
</property>
|
||||||
|
<property name="mutableAclService" ref="aclService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
-
|
-
|
||||||
- Only used by "cas" artifact.
|
- Only used by "cas" artifact.
|
||||||
-
|
-
|
||||||
- $Id$
|
- $Id: applicationContext-acegi-security.xml 1409 2006-04-26 23:36:03Z benalex $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<beans>
|
<beans>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="jdbcDaoImpl" class="org.acegisecurity.userdetails.jdbc.JdbcDaoImpl">
|
<bean id="jdbcDaoImpl" class="org.acegisecurity.userdetails.jdbc.JdbcDaoImpl">
|
||||||
<property name="dataSource"><ref bean="dataSource"/></property>
|
<property name="dataSource" ref="dataSource"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="basicProcessingFilter" class="org.acegisecurity.ui.basicauth.BasicProcessingFilter">
|
<bean id="basicProcessingFilter" class="org.acegisecurity.ui.basicauth.BasicProcessingFilter">
|
||||||
@ -47,8 +47,7 @@
|
|||||||
<property name="realmName"><value>Contacts Realm</value></property>
|
<property name="realmName"><value>Contacts Realm</value></property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="httpSessionContextIntegrationFilter" class="org.acegisecurity.context.HttpSessionContextIntegrationFilter">
|
<bean id="httpSessionContextIntegrationFilter" class="org.acegisecurity.context.HttpSessionContextIntegrationFilter"/>
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="casAuthenticationProvider" class="org.acegisecurity.providers.cas.CasAuthenticationProvider">
|
<bean id="casAuthenticationProvider" class="org.acegisecurity.providers.cas.CasAuthenticationProvider">
|
||||||
<property name="casAuthoritiesPopulator"><ref local="casAuthoritiesPopulator"/></property>
|
<property name="casAuthoritiesPopulator"><ref local="casAuthoritiesPopulator"/></property>
|
||||||
@ -59,8 +58,8 @@
|
|||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="casProxyTicketValidator" class="org.acegisecurity.providers.cas.ticketvalidator.CasProxyTicketValidator">
|
<bean id="casProxyTicketValidator" class="org.acegisecurity.providers.cas.ticketvalidator.CasProxyTicketValidator">
|
||||||
<property name="casValidate"><value>https://localhost:8443/cas/proxyValidate</value></property>
|
<property name="casValidate" value="https://localhost:8443/cas/proxyValidate"/>
|
||||||
<property name="proxyCallbackUrl"><value>https://localhost:8443/contacts-cas/casProxy/receptor</value></property>
|
<property name="proxyCallbackUrl" value="https://localhost:8443/contacts-cas/casProxy/receptor"/>
|
||||||
<property name="serviceProperties"><ref local="serviceProperties"/></property>
|
<property name="serviceProperties"><ref local="serviceProperties"/></property>
|
||||||
<!-- <property name="trustStore"><value>/some/path/to/your/lib/security/cacerts</value></property> -->
|
<!-- <property name="trustStore"><value>/some/path/to/your/lib/security/cacerts</value></property> -->
|
||||||
</bean>
|
</bean>
|
||||||
@ -68,12 +67,8 @@
|
|||||||
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"/>
|
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"/>
|
||||||
|
|
||||||
<bean id="ticketCacheBackend" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
|
<bean id="ticketCacheBackend" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
|
||||||
<property name="cacheManager">
|
<property name="cacheManager"><ref local="cacheManager"/></property>
|
||||||
<ref local="cacheManager"/>
|
<property name="cacheName" value="ticketCache"/>
|
||||||
</property>
|
|
||||||
<property name="cacheName">
|
|
||||||
<value>ticketCache</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="statelessTicketCache" class="org.acegisecurity.providers.cas.cache.EhCacheBasedTicketCache">
|
<bean id="statelessTicketCache" class="org.acegisecurity.providers.cas.cache.EhCacheBasedTicketCache">
|
||||||
@ -84,12 +79,11 @@
|
|||||||
<property name="userDetailsService"><ref local="jdbcDaoImpl"/></property>
|
<property name="userDetailsService"><ref local="jdbcDaoImpl"/></property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="casProxyDecider" class="org.acegisecurity.providers.cas.proxy.RejectProxyTickets">
|
<bean id="casProxyDecider" class="org.acegisecurity.providers.cas.proxy.RejectProxyTickets"/>
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="serviceProperties" class="org.acegisecurity.ui.cas.ServiceProperties">
|
<bean id="serviceProperties" class="org.acegisecurity.ui.cas.ServiceProperties">
|
||||||
<property name="service"><value>https://localhost:8443/contacts-cas/j_acegi_cas_security_check</value></property>
|
<property name="service" value="https://localhost:8443/contacts-cas/j_acegi_cas_security_check"/>
|
||||||
<property name="sendRenew"><value>false</value></property>
|
<property name="sendRenew" value="false"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- note logout has little impact, due to CAS reauthentication functionality (it will cause a refresh of the authentication though) -->
|
<!-- note logout has little impact, due to CAS reauthentication functionality (it will cause a refresh of the authentication though) -->
|
@ -7,7 +7,7 @@
|
|||||||
-
|
-
|
||||||
- Only used by "ldap" artifact.
|
- Only used by "ldap" artifact.
|
||||||
-
|
-
|
||||||
- $Id$
|
- $Id: applicationContext-acegi-security.xml 1468 2006-05-20 17:50:51Z luke_t $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<beans>
|
<beans>
|
||||||
@ -37,9 +37,9 @@
|
|||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="initialDirContextFactory" class="org.acegisecurity.ldap.DefaultInitialDirContextFactory">
|
<bean id="initialDirContextFactory" class="org.acegisecurity.ldap.DefaultInitialDirContextFactory">
|
||||||
<constructor-arg value="ldap://monkeymachine:389/dc=acegisecurity,dc=org"/>
|
<constructor-arg value="ldap://monkeymachine.co.uk:389/dc=acegisecurity,dc=org"/>
|
||||||
<property name="managerDn"><value>cn=manager,dc=acegisecurity,dc=org</value></property>
|
<property name="managerDn" value="cn=manager,dc=acegisecurity,dc=org" />
|
||||||
<property name="managerPassword"><value>acegisecurity</value></property>
|
<property name="managerPassword" value="acegisecurity"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="ldapAuthenticationProvider" class="org.acegisecurity.providers.ldap.LdapAuthenticationProvider">
|
<bean id="ldapAuthenticationProvider" class="org.acegisecurity.providers.ldap.LdapAuthenticationProvider">
|
@ -7,7 +7,7 @@
|
|||||||
-
|
-
|
||||||
- Only used by "x509" artifact.
|
- Only used by "x509" artifact.
|
||||||
-
|
-
|
||||||
- $Id$
|
- $Id: applicationContext-acegi-security.xml 1409 2006-04-26 23:36:03Z benalex $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<beans>
|
<beans>
|
@ -7,7 +7,7 @@
|
|||||||
-
|
-
|
||||||
- Only used by "filter" artifact.
|
- Only used by "filter" artifact.
|
||||||
-
|
-
|
||||||
- $Id$
|
- $Id: applicationContext-acegi-security.xml 1425 2006-04-28 06:43:50Z benalex $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<beans>
|
<beans>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<value>
|
<value>
|
||||||
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
|
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
|
||||||
PATTERN_TYPE_APACHE_ANT
|
PATTERN_TYPE_APACHE_ANT
|
||||||
/**=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,securityContextHolderAwareRequestFilter,rememberMeProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor,switchUserProcessingFilter
|
/**=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,securityContextHolderAwareRequestFilter,rememberMeProcessingFilter,anonymousProcessingFilter,switchUserProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor
|
||||||
</value>
|
</value>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@ -46,10 +46,10 @@
|
|||||||
|
|
||||||
<bean id="daoAuthenticationProvider" class="org.acegisecurity.providers.dao.DaoAuthenticationProvider">
|
<bean id="daoAuthenticationProvider" class="org.acegisecurity.providers.dao.DaoAuthenticationProvider">
|
||||||
<property name="userDetailsService"><ref local="jdbcDaoImpl"/></property>
|
<property name="userDetailsService"><ref local="jdbcDaoImpl"/></property>
|
||||||
<property name="userCache"><ref local="userCache"/></property>
|
<!-- <property name="userCache"><ref local="userCache"/></property> -->
|
||||||
<property name="passwordEncoder"><ref local="passwordEncoder"/></property>
|
<property name="passwordEncoder"><ref local="passwordEncoder"/></property>
|
||||||
</bean>
|
</bean>
|
||||||
|
<!--
|
||||||
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"/>
|
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"/>
|
||||||
|
|
||||||
<bean id="userCacheBackend" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
|
<bean id="userCacheBackend" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
|
||||||
@ -64,7 +64,7 @@
|
|||||||
<bean id="userCache" class="org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache">
|
<bean id="userCache" class="org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache">
|
||||||
<property name="cache"><ref local="userCacheBackend"/></property>
|
<property name="cache"><ref local="userCacheBackend"/></property>
|
||||||
</bean>
|
</bean>
|
||||||
|
-->
|
||||||
<!-- Automatically receives AuthenticationEvent messages -->
|
<!-- Automatically receives AuthenticationEvent messages -->
|
||||||
<bean id="loggerListener" class="org.acegisecurity.event.authentication.LoggerListener"/>
|
<bean id="loggerListener" class="org.acegisecurity.event.authentication.LoggerListener"/>
|
||||||
|
|
@ -0,0 +1,83 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
- Application context definition for "contacts" DispatcherServlet.
|
||||||
|
-
|
||||||
|
- $Id: contacts-servlet.xml 1754 2006-11-17 02:01:21Z benalex $
|
||||||
|
-->
|
||||||
|
|
||||||
|
<beans>
|
||||||
|
|
||||||
|
<!-- ========================== WEB DEFINITIONS ======================= -->
|
||||||
|
|
||||||
|
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
|
||||||
|
<property name="basename" value="messages"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="publicIndexController" class="sample.contact.PublicIndexController">
|
||||||
|
<property name="contactManager" ref="contactManager"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="secureIndexController" class="sample.contact.SecureIndexController">
|
||||||
|
<property name="contactManager" ref="contactManager"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="secureDeleteController" class="sample.contact.DeleteController">
|
||||||
|
<property name="contactManager" ref="contactManager"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="adminPermissionController" class="sample.contact.AdminPermissionController">
|
||||||
|
<property name="contactManager" ref="contactManager"/>
|
||||||
|
<property name="aclService" ref="aclService"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="deletePermissionController" class="sample.contact.DeletePermissionController">
|
||||||
|
<property name="contactManager" ref="contactManager"/>
|
||||||
|
<property name="aclService" ref="aclService"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
|
||||||
|
<property name="mappings">
|
||||||
|
<props>
|
||||||
|
<prop key="/hello.htm">publicIndexController</prop>
|
||||||
|
<prop key="/secure/add.htm">secureAddForm</prop>
|
||||||
|
<prop key="/secure/index.htm">secureIndexController</prop>
|
||||||
|
<prop key="/secure/del.htm">secureDeleteController</prop>
|
||||||
|
<prop key="/secure/adminPermission.htm">adminPermissionController</prop>
|
||||||
|
<prop key="/secure/deletePermission.htm">deletePermissionController</prop>
|
||||||
|
<prop key="/secure/addPermission.htm">addPermissionForm</prop>
|
||||||
|
</props>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="secureAddForm" class="sample.contact.WebContactAddController">
|
||||||
|
<property name="sessionForm" value="true"/>
|
||||||
|
<property name="commandName" value="webContact"/>
|
||||||
|
<property name="commandClass" value="sample.contact.WebContact"/>
|
||||||
|
<property name="validator">
|
||||||
|
<bean id="addValidator" class="sample.contact.WebContactValidator"/>
|
||||||
|
</property>
|
||||||
|
<property name="formView" value="add"/>
|
||||||
|
<property name="successView" value="index.htm"/>
|
||||||
|
<property name="contactManager" ref="contactManager"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="addPermissionForm" class="sample.contact.AddPermissionController">
|
||||||
|
<property name="sessionForm" value="true"/>
|
||||||
|
<property name="commandName" value="addPermission"/>
|
||||||
|
<property name="commandClass" value="sample.contact.AddPermission"/>
|
||||||
|
<property name="validator">
|
||||||
|
<bean id="addPermissionValidator" class="sample.contact.AddPermissionValidator"/>
|
||||||
|
</property>
|
||||||
|
<property name="formView" value="addPermission"/>
|
||||||
|
<property name="successView" value="index.htm"/>
|
||||||
|
<property name="contactManager" ref="contactManager"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||||
|
<property name="prefix" value="/WEB-INF/jsp/"/>
|
||||||
|
<property name="suffix" value=".jsp"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
</beans>
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
- Contacts web application
|
- Contacts web application
|
||||||
- $Id$
|
- $Id: remoting-servlet.xml 469 2004-11-20 05:28:20Z benalex $
|
||||||
-->
|
-->
|
||||||
<beans>
|
<beans>
|
||||||
|
|
@ -4,9 +4,7 @@
|
|||||||
<!--
|
<!--
|
||||||
- Contacts web application
|
- Contacts web application
|
||||||
-
|
-
|
||||||
- web.xml for "ldap" artifact only.
|
- $Id: web.xml 1741 2006-11-14 03:18:42Z benalex $
|
||||||
-
|
|
||||||
- $Id$
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<web-app>
|
<web-app>
|
||||||
@ -26,11 +24,27 @@
|
|||||||
</param-value>
|
</param-value>
|
||||||
</context-param>
|
</context-param>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Required for CAS ProxyTicketReceptor servlet. This is the
|
||||||
|
URL to CAS' "proxy" actuator, where a PGT and TargetService can
|
||||||
|
be presented to obtain a new proxy ticket. THIS CAN BE
|
||||||
|
REMOVED IF THE APPLICATION DOESN'T NEED TO ACT AS A PROXY
|
||||||
|
-->
|
||||||
|
|
||||||
|
<context-param>
|
||||||
|
<param-name>edu.yale.its.tp.cas.proxyUrl</param-name>
|
||||||
|
<param-value>http://localhost:8433/cas/proxy</param-value>
|
||||||
|
</context-param>
|
||||||
|
|
||||||
|
<!-- Nothing below here needs to be modified -->
|
||||||
|
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>log4jConfigLocation</param-name>
|
<param-name>log4jConfigLocation</param-name>
|
||||||
<param-value>/WEB-INF/classes/log4j.properties</param-value>
|
<param-value>/WEB-INF/classes/log4j.properties</param-value>
|
||||||
</context-param>
|
</context-param>
|
||||||
|
|
||||||
|
|
||||||
<filter>
|
<filter>
|
||||||
<filter-name>Acegi Filter Chain Proxy</filter-name>
|
<filter-name>Acegi Filter Chain Proxy</filter-name>
|
||||||
<filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
|
<filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
<form action="<c:url value='j_acegi_security_check'/>" method="POST">
|
<form action="<c:url value='j_acegi_security_check'/>" method="POST">
|
||||||
<table>
|
<table>
|
||||||
<tr><td>User:</td><td><input type='text' name='j_username' <c:if test="${not empty param.login_error}">value='<c:out value="${ACEGI_SECURITY_LAST_USERNAME}"/></c:if>></td></tr>
|
<tr><td>User:</td><td><input type='text' name='j_username' <c:if test="${not empty param.login_error}">value='<%= session.getAttribute(AuthenticationProcessingFilter.ACEGI_SECURITY_LAST_USERNAME_KEY) %>'</c:if>></td></tr>
|
||||||
<tr><td>Password:</td><td><input type='password' name='j_password'></td></tr>
|
<tr><td>Password:</td><td><input type='password' name='j_password'></td></tr>
|
||||||
<tr><td><input type="checkbox" name="_acegi_security_remember_me"></td><td>Don't ask for my password for two weeks</td></tr>
|
<tr><td><input type="checkbox" name="_acegi_security_remember_me"></td><td>Don't ask for my password for two weeks</td></tr>
|
||||||
|
|
@ -1,70 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Application context containing authentication, channel
|
|
||||||
- security and web URI beans.
|
|
||||||
-
|
|
||||||
- Only used by "ca" artifact.
|
|
||||||
-
|
|
||||||
- $Id$
|
|
||||||
-->
|
|
||||||
|
|
||||||
<beans>
|
|
||||||
|
|
||||||
<!-- ======================== FILTER CHAIN ======================= -->
|
|
||||||
|
|
||||||
<!-- if you wish to use channel security, add "channelProcessingFilter," in front
|
|
||||||
of "authenticationProcessingFilter" in the list below -->
|
|
||||||
<bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy">
|
|
||||||
<property name="filterInvocationDefinitionSource">
|
|
||||||
<value>
|
|
||||||
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
|
|
||||||
PATTERN_TYPE_APACHE_ANT
|
|
||||||
/**=httpSessionContextIntegrationFilter,httpRequestIntegrationFilter,logoutFilter
|
|
||||||
</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- ======================== AUTHENTICATION ======================= -->
|
|
||||||
|
|
||||||
<!-- We could also have a daoAuthenticationProvider in order to
|
|
||||||
process BASIC authentication requests, but this has been
|
|
||||||
left out given container adapters aren't recommended and
|
|
||||||
it would increase the number of bean declarations required -->
|
|
||||||
<bean id="authenticationManager" class="org.acegisecurity.providers.ProviderManager">
|
|
||||||
<property name="providers">
|
|
||||||
<list>
|
|
||||||
<ref local="authByAdapterProvider"/>
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="authByAdapterProvider" class="org.acegisecurity.adapters.AuthByAdapterProvider">
|
|
||||||
<property name="key"><value>my_password</value></property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="httpRequestIntegrationFilter" class="org.acegisecurity.adapters.HttpRequestIntegrationFilter"/>
|
|
||||||
|
|
||||||
<bean id="httpSessionContextIntegrationFilter" class="org.acegisecurity.context.HttpSessionContextIntegrationFilter">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- note logout has little impact, due to container authentication functionality (used only so /j_acegi_logout doesn't give URL error) -->
|
|
||||||
<bean id="logoutFilter" class="org.acegisecurity.ui.logout.LogoutFilter">
|
|
||||||
<constructor-arg value="/index.jsp"/> <!-- URL redirected to after logout -->
|
|
||||||
<constructor-arg>
|
|
||||||
<list>
|
|
||||||
<bean class="org.acegisecurity.ui.logout.SecurityContextLogoutHandler"/>
|
|
||||||
</list>
|
|
||||||
</constructor-arg>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- ===================== HTTP CHANNEL REQUIREMENTS ==================== -->
|
|
||||||
|
|
||||||
<!-- Implement by servlet specification -->
|
|
||||||
|
|
||||||
<!-- ===================== HTTP REQUEST SECURITY ==================== -->
|
|
||||||
|
|
||||||
<!-- Implement by servlet specification -->
|
|
||||||
|
|
||||||
</beans>
|
|
@ -1,48 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
|
||||||
<!--
|
|
||||||
* The Acegi Security System for Spring is published under the terms
|
|
||||||
* of the Apache Software License.
|
|
||||||
*
|
|
||||||
* This springsecurity.xml file will only be used by Resin. Normally the
|
|
||||||
* springsecurity.xml is container-wide, but in the case of Resin it is
|
|
||||||
* web application specific.
|
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* This file will be copied into WAR's classes directory if using container adapter
|
|
||||||
*
|
|
||||||
-->
|
|
||||||
|
|
||||||
<beans>
|
|
||||||
|
|
||||||
<!-- ================= CONTAINER ADAPTER CONFIGURATION ================ -->
|
|
||||||
|
|
||||||
<!-- Data access object which stores authentication information -->
|
|
||||||
<bean id="inMemoryDaoImpl" class="org.acegisecurity.userdetails.memory.InMemoryDaoImpl">
|
|
||||||
<property name="userMap">
|
|
||||||
<value>
|
|
||||||
marissa=koala,ROLE_TELLER,ROLE_SUPERVISOR
|
|
||||||
dianne=emu,ROLE_TELLER
|
|
||||||
scott=wombat,ROLE_TELLER
|
|
||||||
peter=opal,disabled,ROLE_TELLER
|
|
||||||
</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Authentication provider that queries our data access object -->
|
|
||||||
<bean id="daoAuthenticationProvider" class="org.acegisecurity.providers.dao.DaoAuthenticationProvider">
|
|
||||||
<property name="userDetailsService"><ref bean="inMemoryDaoImpl"/></property>
|
|
||||||
<property name="forcePrincipalAsString"><value>true</value></property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- The authentication manager that iterates through our only authentication provider -->
|
|
||||||
<bean id="authenticationManager" class="org.acegisecurity.providers.ProviderManager">
|
|
||||||
<property name="providers">
|
|
||||||
<list>
|
|
||||||
<ref bean="daoAuthenticationProvider"/>
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
</beans>
|
|
@ -1,7 +0,0 @@
|
|||||||
<!--
|
|
||||||
- $Id$
|
|
||||||
- File will be copied into WAR's WEB-INF directory if using container adapter
|
|
||||||
-->
|
|
||||||
<jboss-web>
|
|
||||||
<security-domain>java:/jaas/SpringPoweredRealm</security-domain>
|
|
||||||
</jboss-web>
|
|
@ -1,13 +0,0 @@
|
|||||||
<!--
|
|
||||||
- $Id$
|
|
||||||
- File will be copied into WAR's WEB-INF directory if using container adapter
|
|
||||||
-->
|
|
||||||
<web-app>
|
|
||||||
<authenticator>
|
|
||||||
<type>org.acegisecurity.adapters.resin.ResinAcegiAuthenticator</type>
|
|
||||||
<init>
|
|
||||||
<app-context-location>resin-acegisecurity.xml</app-context-location>
|
|
||||||
<key>my_password</key>
|
|
||||||
</init>
|
|
||||||
</authenticator>
|
|
||||||
</web-app>
|
|
@ -1,137 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Contacts web application
|
|
||||||
-
|
|
||||||
- web.xml for "ca" artifact only.
|
|
||||||
-
|
|
||||||
- $Id$
|
|
||||||
-->
|
|
||||||
|
|
||||||
<web-app>
|
|
||||||
|
|
||||||
<display-name>Contacts Sample Application</display-name>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Location of the XML file that defines the root application context
|
|
||||||
- Applied by ContextLoaderListener.
|
|
||||||
-->
|
|
||||||
<context-param>
|
|
||||||
<param-name>contextConfigLocation</param-name>
|
|
||||||
<param-value>
|
|
||||||
/WEB-INF/applicationContext-acegi-security.xml
|
|
||||||
classpath:applicationContext-common-business.xml
|
|
||||||
classpath:applicationContext-common-authorization.xml
|
|
||||||
</param-value>
|
|
||||||
</context-param>
|
|
||||||
|
|
||||||
<context-param>
|
|
||||||
<param-name>log4jConfigLocation</param-name>
|
|
||||||
<param-value>/WEB-INF/classes/log4j.properties</param-value>
|
|
||||||
</context-param>
|
|
||||||
|
|
||||||
<filter>
|
|
||||||
<filter-name>Acegi Filter Chain Proxy</filter-name>
|
|
||||||
<filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
|
|
||||||
<init-param>
|
|
||||||
<param-name>targetClass</param-name>
|
|
||||||
<param-value>org.acegisecurity.util.FilterChainProxy</param-value>
|
|
||||||
</init-param>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<filter-mapping>
|
|
||||||
<filter-name>Acegi Filter Chain Proxy</filter-name>
|
|
||||||
<url-pattern>/*</url-pattern>
|
|
||||||
</filter-mapping>
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Loads the root application context of this web app at startup.
|
|
||||||
- The application context is then available via
|
|
||||||
- WebApplicationContextUtils.getWebApplicationContext(servletContext).
|
|
||||||
-->
|
|
||||||
<listener>
|
|
||||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
|
||||||
</listener>
|
|
||||||
|
|
||||||
<listener>
|
|
||||||
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
|
|
||||||
</listener>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Provides core MVC application controller. See contacts-servlet.xml.
|
|
||||||
-->
|
|
||||||
<servlet>
|
|
||||||
<servlet-name>contacts</servlet-name>
|
|
||||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
|
||||||
<load-on-startup>1</load-on-startup>
|
|
||||||
</servlet>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Provides web services endpoint. See remoting-servlet.xml.
|
|
||||||
-->
|
|
||||||
<servlet>
|
|
||||||
<servlet-name>remoting</servlet-name>
|
|
||||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
|
||||||
<load-on-startup>2</load-on-startup>
|
|
||||||
</servlet>
|
|
||||||
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>contacts</servlet-name>
|
|
||||||
<url-pattern>*.htm</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>remoting</servlet-name>
|
|
||||||
<url-pattern>/remoting/*</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<welcome-file-list>
|
|
||||||
<welcome-file>index.jsp</welcome-file>
|
|
||||||
</welcome-file-list>
|
|
||||||
|
|
||||||
<taglib>
|
|
||||||
<taglib-uri>/spring</taglib-uri>
|
|
||||||
<taglib-location>/WEB-INF/spring.tld</taglib-location>
|
|
||||||
</taglib>
|
|
||||||
|
|
||||||
<security-constraint>
|
|
||||||
<display-name>Secured Area Security Constraint</display-name>
|
|
||||||
<web-resource-collection>
|
|
||||||
<web-resource-name>Secured Area</web-resource-name>
|
|
||||||
<url-pattern>/secure/*</url-pattern>
|
|
||||||
</web-resource-collection>
|
|
||||||
<auth-constraint>
|
|
||||||
<role-name>ROLE_USER</role-name>
|
|
||||||
<role-name>ROLE_SUPERVISOR</role-name>
|
|
||||||
</auth-constraint>
|
|
||||||
</security-constraint>
|
|
||||||
|
|
||||||
<!-- Default login configuration using BASIC authentication -->
|
|
||||||
<!--
|
|
||||||
<login-config>
|
|
||||||
<auth-method>BASIC</auth-method>
|
|
||||||
<realm-name>Spring Powered Realm</realm-name>
|
|
||||||
</login-config>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Default login configuration using form-based authentication -->
|
|
||||||
<login-config>
|
|
||||||
<auth-method>FORM</auth-method>
|
|
||||||
<realm-name>Spring Powered Realm</realm-name>
|
|
||||||
<form-login-config>
|
|
||||||
<form-login-page>/login.jsp</form-login-page>
|
|
||||||
<form-error-page>/login.jsp?login_error=1</form-error-page>
|
|
||||||
</form-login-config>
|
|
||||||
</login-config>
|
|
||||||
|
|
||||||
<!-- Security roles referenced by this web application -->
|
|
||||||
<security-role>
|
|
||||||
<role-name>ROLE_SUPERVISOR</role-name>
|
|
||||||
</security-role>
|
|
||||||
<security-role>
|
|
||||||
<role-name>ROLE_USER</role-name>
|
|
||||||
</security-role>
|
|
||||||
|
|
||||||
</web-app>
|
|
@ -1,46 +0,0 @@
|
|||||||
<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core' %>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Login</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<h1>Login</h1>
|
|
||||||
|
|
||||||
<P>Valid users:
|
|
||||||
<P>
|
|
||||||
<P>username <b>marissa</b>, password <b>koala</b>
|
|
||||||
<P>username <b>dianne</b>, password <b>emu</b>
|
|
||||||
<p>username <b>scott</b>, password <b>wombat</b>
|
|
||||||
<p>username <b>peter</b>, password <b>opal</b> (user disabled)
|
|
||||||
<p>username <b>bill</b>, password <b>wombat</b>
|
|
||||||
<p>username <b>bob</b>, password <b>wombat</b>
|
|
||||||
<p>username <b>jane</b>, password <b>wombat</b>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
<%-- this form-login-page form is also used as the
|
|
||||||
form-error-page to ask for a login again.
|
|
||||||
--%>
|
|
||||||
<c:if test="${not empty param.login_error}">
|
|
||||||
<font color="red">
|
|
||||||
Your login attempt was not successful, try again.
|
|
||||||
</font>
|
|
||||||
</c:if>
|
|
||||||
|
|
||||||
<form action="<c:url value='j_security_check'/>" method="POST">
|
|
||||||
<table>
|
|
||||||
<tr><td>User:</td><td><input type='text' name='j_username'></td></tr>
|
|
||||||
<tr><td>Password:</td><td><input type='password' name='j_password'></td></tr>
|
|
||||||
|
|
||||||
<tr><td colspan='2'><input name="submit" type="submit"></td></tr>
|
|
||||||
<tr><td colspan='2'><input name="reset" type="reset"></td></tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- The j_uri is a Resin requirement (ignored by other containers)
|
|
||||||
-->
|
|
||||||
<input type='hidden' name='j_uri' value='/secure/index.htm'/>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,107 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Contacts web application
|
|
||||||
-
|
|
||||||
- web.xml for "cas" artifact only.
|
|
||||||
-
|
|
||||||
- $Id$
|
|
||||||
-->
|
|
||||||
|
|
||||||
<web-app>
|
|
||||||
|
|
||||||
<display-name>Contacts Sample Application</display-name>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Location of the XML file that defines the root application context
|
|
||||||
- Applied by ContextLoaderListener.
|
|
||||||
-->
|
|
||||||
<context-param>
|
|
||||||
<param-name>contextConfigLocation</param-name>
|
|
||||||
<param-value>
|
|
||||||
/WEB-INF/applicationContext-acegi-security.xml
|
|
||||||
classpath:applicationContext-common-business.xml
|
|
||||||
classpath:applicationContext-common-authorization.xml
|
|
||||||
</param-value>
|
|
||||||
</context-param>
|
|
||||||
|
|
||||||
<context-param>
|
|
||||||
<param-name>log4jConfigLocation</param-name>
|
|
||||||
<param-value>/WEB-INF/classes/log4j.properties</param-value>
|
|
||||||
</context-param>
|
|
||||||
|
|
||||||
<!-- Required for CAS ProxyTicketReceptor servlet. This is the
|
|
||||||
URL to CAS' "proxy" actuator, where a PGT and TargetService can
|
|
||||||
be presented to obtain a new proxy ticket. THIS CAN BE
|
|
||||||
REMOVED IF THE APPLICATION DOESN'T NEED TO ACT AS A PROXY -->
|
|
||||||
<context-param>
|
|
||||||
<param-name>edu.yale.its.tp.cas.proxyUrl</param-name>
|
|
||||||
<param-value>http://localhost:8433/cas/proxy</param-value>
|
|
||||||
</context-param>
|
|
||||||
|
|
||||||
<filter>
|
|
||||||
<filter-name>Acegi Filter Chain Proxy</filter-name>
|
|
||||||
<filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
|
|
||||||
<init-param>
|
|
||||||
<param-name>targetClass</param-name>
|
|
||||||
<param-value>org.acegisecurity.util.FilterChainProxy</param-value>
|
|
||||||
</init-param>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<filter-mapping>
|
|
||||||
<filter-name>Acegi Filter Chain Proxy</filter-name>
|
|
||||||
<url-pattern>/*</url-pattern>
|
|
||||||
</filter-mapping>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Loads the root application context of this web app at startup.
|
|
||||||
- The application context is then available via
|
|
||||||
- WebApplicationContextUtils.getWebApplicationContext(servletContext).
|
|
||||||
-->
|
|
||||||
<listener>
|
|
||||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
|
||||||
</listener>
|
|
||||||
|
|
||||||
<listener>
|
|
||||||
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
|
|
||||||
</listener>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Provides core MVC application controller. See contacts-servlet.xml.
|
|
||||||
-->
|
|
||||||
<servlet>
|
|
||||||
<servlet-name>contacts</servlet-name>
|
|
||||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
|
||||||
<load-on-startup>1</load-on-startup>
|
|
||||||
</servlet>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Provides web services endpoint. See remoting-servlet.xml.
|
|
||||||
-->
|
|
||||||
<servlet>
|
|
||||||
<servlet-name>remoting</servlet-name>
|
|
||||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
|
||||||
<load-on-startup>2</load-on-startup>
|
|
||||||
</servlet>
|
|
||||||
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>contacts</servlet-name>
|
|
||||||
<url-pattern>*.htm</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>remoting</servlet-name>
|
|
||||||
<url-pattern>/remoting/*</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<welcome-file-list>
|
|
||||||
<welcome-file>index.jsp</welcome-file>
|
|
||||||
</welcome-file-list>
|
|
||||||
|
|
||||||
<taglib>
|
|
||||||
<taglib-uri>/spring</taglib-uri>
|
|
||||||
<taglib-location>/WEB-INF/spring.tld</taglib-location>
|
|
||||||
</taglib>
|
|
||||||
|
|
||||||
</web-app>
|
|
@ -1,6 +1,6 @@
|
|||||||
<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core' %>
|
<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core' %>
|
||||||
<%@ page import="net.sf.acegisecurity.ui.AbstractProcessingFilter" %>
|
<%@ page import="org.acegisecurity.ui.AbstractProcessingFilter" %>
|
||||||
<%@ page import="net.sf.acegisecurity.AuthenticationException" %>
|
<%@ page import="org.acegisecurity.AuthenticationException" %>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<font color="red">
|
<font color="red">
|
||||||
Your CAS credentials were rejected.<BR><BR>
|
Your CAS credentials were rejected.<BR><BR>
|
||||||
Reason: <%= ((AuthenticationException) session.getAttribute(AbstractProcessingFilter.ACEGI_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %>
|
Reason: <%= ((AuthenticationException) session.getAttribute(org.acegisecurity.ui.AbstractProcessingFilter.ACEGI_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %>
|
||||||
</font>
|
</font>
|
||||||
|
|
||||||
</body>
|
</body>
|
@ -1,87 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Application context definition for "contacts" DispatcherServlet.
|
|
||||||
-
|
|
||||||
- $Id$
|
|
||||||
-->
|
|
||||||
|
|
||||||
<beans>
|
|
||||||
|
|
||||||
<!-- ========================== WEB DEFINITIONS ======================= -->
|
|
||||||
|
|
||||||
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
|
|
||||||
<property name="basename"><value>messages</value></property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="publicIndexController" class="sample.contact.PublicIndexController">
|
|
||||||
<property name="contactManager"><ref bean="contactManager"/></property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="secureIndexController" class="sample.contact.SecureIndexController">
|
|
||||||
<property name="contactManager"><ref bean="contactManager"/></property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="secureDeleteController" class="sample.contact.DeleteController">
|
|
||||||
<property name="contactManager"><ref bean="contactManager"/></property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="adminPermissionController" class="sample.contact.AdminPermissionController">
|
|
||||||
<property name="contactManager"><ref bean="contactManager"/></property>
|
|
||||||
<property name="aclService"><ref bean="aclService"/></property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="deletePermissionController" class="sample.contact.DeletePermissionController">
|
|
||||||
<property name="contactManager"><ref bean="contactManager"/></property>
|
|
||||||
<property name="aclService"><ref bean="aclService"/></property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
|
|
||||||
<property name="mappings">
|
|
||||||
<props>
|
|
||||||
<prop key="/hello.htm">publicIndexController</prop>
|
|
||||||
<prop key="/secure/add.htm">secureAddForm</prop>
|
|
||||||
<prop key="/secure/index.htm">secureIndexController</prop>
|
|
||||||
<prop key="/secure/del.htm">secureDeleteController</prop>
|
|
||||||
<prop key="/secure/adminPermission.htm">adminPermissionController</prop>
|
|
||||||
<prop key="/secure/deletePermission.htm">deletePermissionController</prop>
|
|
||||||
<prop key="/secure/addPermission.htm">addPermissionForm</prop>
|
|
||||||
</props>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="addValidator" class="sample.contact.WebContactValidator"/>
|
|
||||||
|
|
||||||
<bean id="addPermissionValidator" class="sample.contact.AddPermissionValidator"/>
|
|
||||||
|
|
||||||
<bean id="secureAddForm" class="sample.contact.WebContactAddController">
|
|
||||||
<property name="sessionForm"><value>true</value></property>
|
|
||||||
<property name="commandName"><value>webContact</value></property>
|
|
||||||
<property name="commandClass"><value>sample.contact.WebContact</value></property>
|
|
||||||
<property name="validator"><ref bean="addValidator"/></property>
|
|
||||||
<property name="formView"><value>add</value></property>
|
|
||||||
<property name="successView"><value>index.htm</value></property>
|
|
||||||
<property name="contactManager">
|
|
||||||
<ref bean="contactManager"/>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="addPermissionForm" class="sample.contact.AddPermissionController">
|
|
||||||
<property name="sessionForm"><value>true</value></property>
|
|
||||||
<property name="commandName"><value>addPermission</value></property>
|
|
||||||
<property name="commandClass"><value>sample.contact.AddPermission</value></property>
|
|
||||||
<property name="validator"><ref bean="addPermissionValidator"/></property>
|
|
||||||
<property name="formView"><value>addPermission</value></property>
|
|
||||||
<property name="successView"><value>index.htm</value></property>
|
|
||||||
<property name="contactManager">
|
|
||||||
<ref bean="contactManager"/>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
|
||||||
<property name="prefix"><value>/WEB-INF/jsp/</value></property>
|
|
||||||
<property name="suffix"><value>.jsp</value></property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
</beans>
|
|
@ -1,107 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Contacts web application
|
|
||||||
-
|
|
||||||
- web.xml for "filter" artifact only.
|
|
||||||
-
|
|
||||||
- $Id$
|
|
||||||
-->
|
|
||||||
|
|
||||||
<web-app>
|
|
||||||
|
|
||||||
<display-name>Contacts Sample Application</display-name>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Location of the XML file that defines the root application context
|
|
||||||
- Applied by ContextLoaderListener.
|
|
||||||
-->
|
|
||||||
<context-param>
|
|
||||||
<param-name>contextConfigLocation</param-name>
|
|
||||||
<param-value>
|
|
||||||
/WEB-INF/applicationContext-acegi-security.xml
|
|
||||||
classpath:applicationContext-common-business.xml
|
|
||||||
classpath:applicationContext-common-authorization.xml
|
|
||||||
</param-value>
|
|
||||||
</context-param>
|
|
||||||
|
|
||||||
<context-param>
|
|
||||||
<param-name>log4jConfigLocation</param-name>
|
|
||||||
<param-value>/WEB-INF/classes/log4j.properties</param-value>
|
|
||||||
</context-param>
|
|
||||||
|
|
||||||
<filter>
|
|
||||||
<filter-name>Acegi Filter Chain Proxy</filter-name>
|
|
||||||
<filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
|
|
||||||
<init-param>
|
|
||||||
<param-name>targetClass</param-name>
|
|
||||||
<param-value>org.acegisecurity.util.FilterChainProxy</param-value>
|
|
||||||
</init-param>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<filter-mapping>
|
|
||||||
<filter-name>Acegi Filter Chain Proxy</filter-name>
|
|
||||||
<url-pattern>/*</url-pattern>
|
|
||||||
</filter-mapping>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Loads the root application context of this web app at startup.
|
|
||||||
- The application context is then available via
|
|
||||||
- WebApplicationContextUtils.getWebApplicationContext(servletContext).
|
|
||||||
-->
|
|
||||||
<listener>
|
|
||||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
|
||||||
</listener>
|
|
||||||
|
|
||||||
<listener>
|
|
||||||
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
|
|
||||||
</listener>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
The HttpSessionEventPublisher will publish
|
|
||||||
HttpSessionCreatedEvent and HttpSessionDestroyedEvent
|
|
||||||
to the WebApplicationContext
|
|
||||||
-->
|
|
||||||
<listener>
|
|
||||||
<listener-class>org.acegisecurity.ui.session.HttpSessionEventPublisher</listener-class>
|
|
||||||
</listener>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Provides core MVC application controller. See contacts-servlet.xml.
|
|
||||||
-->
|
|
||||||
<servlet>
|
|
||||||
<servlet-name>contacts</servlet-name>
|
|
||||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
|
||||||
<load-on-startup>1</load-on-startup>
|
|
||||||
</servlet>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Provides web services endpoint. See remoting-servlet.xml.
|
|
||||||
-->
|
|
||||||
<servlet>
|
|
||||||
<servlet-name>remoting</servlet-name>
|
|
||||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
|
||||||
<load-on-startup>2</load-on-startup>
|
|
||||||
</servlet>
|
|
||||||
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>contacts</servlet-name>
|
|
||||||
<url-pattern>*.htm</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>remoting</servlet-name>
|
|
||||||
<url-pattern>/remoting/*</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<welcome-file-list>
|
|
||||||
<welcome-file>index.jsp</welcome-file>
|
|
||||||
</welcome-file-list>
|
|
||||||
|
|
||||||
<taglib>
|
|
||||||
<taglib-uri>/spring</taglib-uri>
|
|
||||||
<taglib-location>/WEB-INF/spring.tld</taglib-location>
|
|
||||||
</taglib>
|
|
||||||
|
|
||||||
</web-app>
|
|
@ -1,46 +0,0 @@
|
|||||||
<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core' %>
|
|
||||||
<%@ page import="org.acegisecurity.ui.AbstractProcessingFilter" %>
|
|
||||||
<%@ page import="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter" %>
|
|
||||||
<%@ page import="org.acegisecurity.AuthenticationException" %>
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Login</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<h1>Login</h1>
|
|
||||||
|
|
||||||
<P>Valid users:
|
|
||||||
<P>
|
|
||||||
<P>username <b>marissa</b>, password <b>koala</b>
|
|
||||||
<P>username <b>dianne</b>, password <b>emu</b>
|
|
||||||
<p>username <b>scott</b>, password <b>wombat</b>
|
|
||||||
<p>username <b>peter</b>, password <b>opal</b> (user disabled)
|
|
||||||
<p>username <b>bill</b>, password <b>wombat</b>
|
|
||||||
<p>username <b>bob</b>, password <b>wombat</b>
|
|
||||||
<p>username <b>jane</b>, password <b>wombat</b>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
<%-- this form-login-page form is also used as the
|
|
||||||
form-error-page to ask for a login again.
|
|
||||||
--%>
|
|
||||||
<c:if test="${not empty param.login_error}">
|
|
||||||
<font color="red">
|
|
||||||
Your login attempt was not successful, try again.<BR><BR>
|
|
||||||
Reason: <%= ((AuthenticationException) session.getAttribute(AbstractProcessingFilter.ACEGI_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %>
|
|
||||||
</font>
|
|
||||||
</c:if>
|
|
||||||
|
|
||||||
<form action="<c:url value='j_acegi_security_check'/>" method="POST">
|
|
||||||
<table>
|
|
||||||
<tr><td>User:</td><td><input type='text' name='j_username' <c:if test="${not empty param.login_error}">value='<c:out value="${ACEGI_SECURITY_LAST_USERNAME}"/></c:if>></td></tr>
|
|
||||||
<tr><td>Password:</td><td><input type='password' name='j_password'></td></tr>
|
|
||||||
<tr><td colspan='2'><input name="submit" type="submit"></td></tr>
|
|
||||||
<tr><td colspan='2'><input name="reset" type="reset"></td></tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,6 +1,5 @@
|
|||||||
<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core' %>
|
<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core' %>
|
||||||
<%@ page import="org.acegisecurity.ui.AbstractProcessingFilter" %>
|
<%@ page import="org.acegisecurity.ui.AbstractProcessingFilter" %>
|
||||||
<%@ page import="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter" %>
|
|
||||||
<%@ page import="org.acegisecurity.AuthenticationException" %>
|
<%@ page import="org.acegisecurity.AuthenticationException" %>
|
||||||
|
|
||||||
<html>
|
<html>
|
@ -1,99 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Contacts web application
|
|
||||||
-
|
|
||||||
- web.xml for "x509" artifact only.
|
|
||||||
-
|
|
||||||
- $Id$
|
|
||||||
-->
|
|
||||||
|
|
||||||
<web-app>
|
|
||||||
|
|
||||||
<display-name>Contacts Sample Application</display-name>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Location of the XML file that defines the root application context
|
|
||||||
- Applied by ContextLoaderListener.
|
|
||||||
-->
|
|
||||||
<context-param>
|
|
||||||
<param-name>contextConfigLocation</param-name>
|
|
||||||
<param-value>
|
|
||||||
/WEB-INF/applicationContext-acegi-security.xml
|
|
||||||
classpath:applicationContext-common-business.xml
|
|
||||||
classpath:applicationContext-common-authorization.xml
|
|
||||||
</param-value>
|
|
||||||
</context-param>
|
|
||||||
<!--
|
|
||||||
<context-param>
|
|
||||||
<param-name>log4jConfigLocation</param-name>
|
|
||||||
<param-value>/WEB-INF/classes/log4j.properties</param-value>
|
|
||||||
</context-param>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<filter>
|
|
||||||
<filter-name>Acegi Filter Chain Proxy</filter-name>
|
|
||||||
<filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
|
|
||||||
<init-param>
|
|
||||||
<param-name>targetClass</param-name>
|
|
||||||
<param-value>org.acegisecurity.util.FilterChainProxy</param-value>
|
|
||||||
</init-param>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<filter-mapping>
|
|
||||||
<filter-name>Acegi Filter Chain Proxy</filter-name>
|
|
||||||
<url-pattern>/*</url-pattern>
|
|
||||||
</filter-mapping>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Loads the root application context of this web app at startup.
|
|
||||||
- The application context is then available via
|
|
||||||
- WebApplicationContextUtils.getWebApplicationContext(servletContext).
|
|
||||||
-->
|
|
||||||
<listener>
|
|
||||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
|
||||||
</listener>
|
|
||||||
<!--
|
|
||||||
<listener>
|
|
||||||
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
|
|
||||||
</listener>
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
- Provides core MVC application controller. See contacts-servlet.xml.
|
|
||||||
-->
|
|
||||||
<servlet>
|
|
||||||
<servlet-name>contacts</servlet-name>
|
|
||||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
|
||||||
<load-on-startup>1</load-on-startup>
|
|
||||||
</servlet>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Provides web services endpoint. See remoting-servlet.xml.
|
|
||||||
-->
|
|
||||||
<servlet>
|
|
||||||
<servlet-name>remoting</servlet-name>
|
|
||||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
|
||||||
<load-on-startup>2</load-on-startup>
|
|
||||||
</servlet>
|
|
||||||
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>contacts</servlet-name>
|
|
||||||
<url-pattern>*.htm</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>remoting</servlet-name>
|
|
||||||
<url-pattern>/remoting/*</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<welcome-file-list>
|
|
||||||
<welcome-file>index.jsp</welcome-file>
|
|
||||||
</welcome-file-list>
|
|
||||||
|
|
||||||
<taglib>
|
|
||||||
<taglib-uri>/spring</taglib-uri>
|
|
||||||
<taglib-location>/WEB-INF/spring.tld</taglib-location>
|
|
||||||
</taglib>
|
|
||||||
|
|
||||||
</web-app>
|
|
Loading…
x
Reference in New Issue
Block a user