Error Throttling Login Attempts

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error Throttling Login Attempts

aruhi
I am working with cas-server-3.4.2 and following the steps given for Configuration of the In-Memory Approaches at
http://www.ja-sig.org/wiki/display/CASUM/Throttling+Login+Attempts 
for throttling login attempts and when I am deploying the cas.war I am getting following 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


And when I copied following code block in cas-servlet.xml from a previous version i.e. cas-server-3.3.1 :-

<bean
                id="loginController"
                class="org.springframework.webflow.executor.mvc.FlowController"
                p:flowExecutor-ref="flowExecutor"
                p:defaultFlowId="login-webflow">
                <property
                        name="argumentHandler">
                        <bean class="org.springframework.webflow.executor.support.RequestParameterFlowExecutorArgumentHandler"
                                p:flowExecutionKeyArgumentName="lt"
                                p:defaultFlowId="login-webflow" />
                </property>
        </bean>


A new error comes, which is as follows:-

org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.webflow.executor.mvc.FlowController] for bean with name 'loginController' defined in ServletContext resource [/WEB-INF/cas-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.webflow.executor.mvc.FlowController


What is it that I am missing to add?

Thanks


--
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
Reply | Threaded
Open this post in threaded view
|

Re: Error Throttling Login Attempts

Scott Battaglia-2
In the latest version of CAS, we're using Spring Web Flow 2, so you'll need something like this:
    <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>

Cheers,
Scott


On Wed, May 5, 2010 at 2:18 PM, aruhi <[hidden email]> wrote:
I am working with cas-server-3.4.2 and following the steps given for Configuration of the In-Memory Approaches at
http://www.ja-sig.org/wiki/display/CASUM/Throttling+Login+Attempts
for throttling login attempts and when I am deploying the cas.war I am getting following 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


And when I copied following code block in cas-servlet.xml from a previous version i.e. cas-server-3.3.1 :-

<bean
               id="loginController"
               class="org.springframework.webflow.executor.mvc.FlowController"
               p:flowExecutor-ref="flowExecutor"
               p:defaultFlowId="login-webflow">
               <property
                       name="argumentHandler">
                       <bean class="org.springframework.webflow.executor.support.RequestParameterFlowExecutorArgumentHandler"
                               p:flowExecutionKeyArgumentName="lt"
                               p:defaultFlowId="login-webflow" />
               </property>
       </bean>


A new error comes, which is as follows:-

org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.webflow.executor.mvc.FlowController] for bean with name 'loginController' defined in ServletContext resource [/WEB-INF/cas-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.webflow.executor.mvc.FlowController


What is it that I am missing to add?

Thanks


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

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
Reply | Threaded
Open this post in threaded view
|

Re: Error Throttling Login Attempts

Patrick Berry
So, just to clarify (for the sake of updating the wiki of course)

Including the following bean in cas-servlet.xml in addition to the following file in spring-configuration should enable login throttling in 3.4.2.

<!-- throttleInterceptorTrigger.xml -->
<?xml version="1.0" encoding="UTF-8"?>

<bean id="throttleInterceptor" class="org.jasig.cas.web.support.InMemoryThrottledSubmissionByIpAddressAndUsernameHandlerInterceptorAdapter" />

<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>

Upon dropping these configs in, I did get a lot of log entries for "Decrementing counts for throttler.  Starting key count: 0", but even after failed attempts it seemed to stay at 0.  Clearly I don't understand how the config maps to the implementation, so if anybody could throw out some details I would appreciate it.



On Wed, May 5, 2010 at 3:47 PM, Scott Battaglia <[hidden email]> wrote:
In the latest version of CAS, we're using Spring Web Flow 2, so you'll need something like this:
    <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>

Cheers,
Scott


On Wed, May 5, 2010 at 2:18 PM, aruhi <[hidden email]> wrote:
I am working with cas-server-3.4.2 and following the steps given for Configuration of the In-Memory Approaches at
http://www.ja-sig.org/wiki/display/CASUM/Throttling+Login+Attempts
for throttling login attempts and when I am deploying the cas.war I am getting following 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


And when I copied following code block in cas-servlet.xml from a previous version i.e. cas-server-3.3.1 :-

<bean
               id="loginController"
               class="org.springframework.webflow.executor.mvc.FlowController"
               p:flowExecutor-ref="flowExecutor"
               p:defaultFlowId="login-webflow">
               <property
                       name="argumentHandler">
                       <bean class="org.springframework.webflow.executor.support.RequestParameterFlowExecutorArgumentHandler"
                               p:flowExecutionKeyArgumentName="lt"
                               p:defaultFlowId="login-webflow" />
               </property>
       </bean>


A new error comes, which is as follows:-

org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.webflow.executor.mvc.FlowController] for bean with name 'loginController' defined in ServletContext resource [/WEB-INF/cas-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.webflow.executor.mvc.FlowController


What is it that I am missing to add?

Thanks


--
You are currently subscribed to [hidden email] as: [hidden email]

To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user

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

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
Reply | Threaded
Open this post in threaded view
|

Re: Error Throttling Login Attempts

Scott Battaglia-2
You're missing this in cas-servlet.xml:

    <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>

Cheers,
Scott

On Wed, May 12, 2010 at 2:20 PM, Patrick Berry <[hidden email]> wrote:
So, just to clarify (for the sake of updating the wiki of course)

Including the following bean in cas-servlet.xml in addition to the following file in spring-configuration should enable login throttling in 3.4.2.

<!-- throttleInterceptorTrigger.xml -->
<?xml version="1.0" encoding="UTF-8"?>

<bean id="throttleInterceptor" class="org.jasig.cas.web.support.InMemoryThrottledSubmissionByIpAddressAndUsernameHandlerInterceptorAdapter" />

<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>

Upon dropping these configs in, I did get a lot of log entries for "Decrementing counts for throttler.  Starting key count: 0", but even after failed attempts it seemed to stay at 0.  Clearly I don't understand how the config maps to the implementation, so if anybody could throw out some details I would appreciate it.



On Wed, May 5, 2010 at 3:47 PM, Scott Battaglia <[hidden email]> wrote:
In the latest version of CAS, we're using Spring Web Flow 2, so you'll need something like this:
    <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>

Cheers,
Scott


On Wed, May 5, 2010 at 2:18 PM, aruhi <[hidden email]> wrote:
I am working with cas-server-3.4.2 and following the steps given for Configuration of the In-Memory Approaches at
http://www.ja-sig.org/wiki/display/CASUM/Throttling+Login+Attempts
for throttling login attempts and when I am deploying the cas.war I am getting following 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


And when I copied following code block in cas-servlet.xml from a previous version i.e. cas-server-3.3.1 :-

<bean
               id="loginController"
               class="org.springframework.webflow.executor.mvc.FlowController"
               p:flowExecutor-ref="flowExecutor"
               p:defaultFlowId="login-webflow">
               <property
                       name="argumentHandler">
                       <bean class="org.springframework.webflow.executor.support.RequestParameterFlowExecutorArgumentHandler"
                               p:flowExecutionKeyArgumentName="lt"
                               p:defaultFlowId="login-webflow" />
               </property>
       </bean>


A new error comes, which is as follows:-

org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.webflow.executor.mvc.FlowController] for bean with name 'loginController' defined in ServletContext resource [/WEB-INF/cas-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.webflow.executor.mvc.FlowController


What is it that I am missing to add?

Thanks


--
You are currently subscribed to [hidden email] as: [hidden email]

To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user

-- 
You are currently subscribed to [hidden email] as: [hidden email]

To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user

-- 

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

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
Reply | Threaded
Open this post in threaded view
|

Re: Error Throttling Login Attempts

nayanmshah
This post has NOT been accepted by the mailing list yet.
Did you ever find an answer to your question. I am facing the same issue. I have been constantly getting 'Decrementing counts for throttler.  Starting key count: 0' when the cleanup trigger is fired. I verified though that the increment works fine.

Hey Scott, why would it be that the ipmap the Scheduler picks up always have zero counts. While the one that increments it has the correct count.