The in memory version ignores the rangeInSeconds. You need to control it by how fast you decrement the count.
Cheers, Scott On Tue, Nov 9, 2010 at 6:45 PM, Xuejin Ruan <[email protected]> wrote: > > Hi Scott, > > I am using CAS Server 3.4.3.1 now. I assume this version fixed the bug in > InMemoryThrottledSubmissionByIpAddressAndUsernameHandlerInterceptorAdapter. > I configured this interceptor as follows: > > ~~~~~~~~~~~~~~~~~~~~~~ > In cas-servlet.xml I added the interceptor to the FlowHandlerMapping: > <ref bean="throttleInterceptor" /> > > and I added a spring-configuration/throttleInterceptorTrigger.xml file: > > <?xml version="1.0" encoding="UTF-8"?> > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:p="http://www.springframework.org/schema/p" > xsi:schemaLocation="http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> > > <bean id="throttleInterceptor" > > class="org.jasig.cas.web.support.InMemoryThrottledSubmissionByIpAddressAndUsernameHandlerInterceptorAdapter" > p:failureRangeInSeconds="120" > p:failureThreshold="2" > /> > <bean id="throttleInterceptorJobDetail" > > class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean" > p:targetObject-ref="throttleInterceptor" > p:targetMethod="decrementCounts" /> > <bean id="periodicThrottleCleanerTrigger" > class="org.springframework.scheduling.quartz.SimpleTriggerBean" > p:jobDetail-ref="throttleInterceptorJobDetail" > p:startDelay="0" > p:repeatInterval="1000" /> > </beans> > ~~~~~~~~~~~~~~~~~~~~~~~~~~ > > However, it doesn't seem that the trigger is working. It failed to throttle > consecutive failed login attempts. And I could not see decrement count in > any log files (cas.log, or Tomcat log files) either. > > What went wrong? Is there any documentation on how to configure this > interceptor? > > Thanks, > > Xuejin > > -- > View this message in context: > http://jasig.275507.n4.nabble.com/Throttling-config-in-cas-3-4-2-1-tp2543984p3035306.html > Sent from the CAS Users mailing list archive at Nabble.com. > > -- > 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 > -- 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
