Hi !

I try to use throttling login attempts which store data on DB on a working CAS 
3.5.1 instance so I have done following steps according to the wiki 
(https://wiki.jasig.org/display/CASUM/Throttling+Login+Attempts) :

File : cas-server-webapp/src/main/webapp/WEB-INF/cas-servlet.xml

+<bean id="handlerMappingB" 
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
+   <property name="mappings">
+      <props>
+         <prop key="/login">loginController</prop>
+      </props>
+   </property>
+   <property name="interceptors">
+      <list>
+            <bean 
class="org.jasig.cas.web.support.InspektrThrottledSubmissionByIpAddressAndUsernameHandlerInterceptorAdapter"
+               p:failureRangeInSeconds="120"
+               p:failureThreshold="100">
+            <constructor-arg index="0" ref="auditTrailManager" />
+            <constructor-arg index="1" ref="dataSource" />
+         </bean>
+         <ref bean="localeChangeInterceptor" />
+      </list>
+   </property>
+</bean>


File : 
cas-server-webapp/src/main/webapp/WEB-INF/spring-configuration/auditTrailContext.xml

 <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";
+       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
        http://www.springframework.org/schema/aop 
http://www.springframework.org/schema/aop/spring-aop-3.1.xsd";>


+<bean id="inspektrTransactionManager"
+    class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
+    p:dataSource-ref="dataSource"
+  />
+
+  <bean id="inspektrTransactionTemplate"
+    class="org.springframework.transaction.support.TransactionTemplate"
+    p:transactionManager-ref="inspektrTransactionManager"
+    p:isolationLevelName="ISOLATION_READ_COMMITTED"
+    p:propagationBehaviorName="PROPAGATION_REQUIRED"
+  />
+
+  <bean id="auditManager" 
class="com.github.inspektr.audit.support.JdbcAuditTrailManager">
+    <constructor-arg index="0" ref="inspektrTransactionTemplate" />
+    <property name="dataSource" ref="dataSource" />
+  </bean>

The 2 tables in the DB are created with indexes.

Once I rebuild and deploy WAR file, I have this error :

org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'handlerMappingB' defined in ServletContext resource 
[/WEB-INF/cas-servlet.xml]: Initialization of bean failed; nested exception is 
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 
'loginController' is defined

The controller LoginController is not found and I didn't find any other 
controller which my have this function. Can you help me please ?

For information, here details on my system :
- CAS : 3.5.1
- Tomcat : 7.0.28
- JRE : OpenJDK 6b24

Best regards,
Sylvain

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to