Hi Rodrigo, I have tried that configuration and it works for me (using CAS 3.5).
Regards. Julio. 2012/9/5 Rodrigo <[email protected]> > Hello, I'm trying to implement throttling on CAS 3.5. > Although I managed to get CAS Server up and running, the throttling > feature isn't working (or it seems so). > > At first, I tried following the instructions for CAS 3.3 that are on the > wiki page: > > https://wiki.jasig.org/display/CASUM/Throttling+Login+Attempts > > With that configuration, CAS Server couldn't start. The I found this post: > > > http://jasig.275507.n4.nabble.com/Error-Throttling-Login-Attempts-td2131456.html > > I think I tried every possible combination of the settings suggested in > the post above, without really succeeding. > > My current settings are: > > - In cas-servlet.xml I added: > > <bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping" > p:flowRegistry-ref="flowRegistry" p:order="2"> > <property name="interceptors"> > <list> > <ref bean="localeChangeInterceptor" /> > <ref bean="throttleInterceptor" /> > </list> > </property> > </bean> > > - throttleInterceptorTrigger.xml contains: > > <?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="3"/> > > <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="10000" /> > </beans> > > Both beans properties are intentionally set to dummy values to try to see > throttling working. > > With these settings, CAS Server starts and it seems like beans are getting > instantiated because I get this message: > > Pre-instantiating singletons in > org.springframework.beans.factory.support.DefaultListableBeanFactory@228079cf: > defining beans > [...throttleInterceptor,throttleInterceptorJobDetail,periodicThrottleCleanerTrigger...] > > (The bean list is really long.) > > However, after lots of login attempts I see no sign of it working (no > message, textbox being disabled, etc.). Not even messages mentioned in the > forum like: > > "Decrementing counts for throttler. Starting key count: 0" > > are being displayed. > > I'm new to CAS and implementing it almost on my own, so any help would be > very much appreciated. > > Thanks. > -- > 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
