Issue Details (XML | Word | Printable)

Key: CONTINUUM-796
Type: Sub-task Sub-task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Carlos Sanchez
Reporter: Carlos Sanchez
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Continuum
CONTINUUM-542

Disable account on login failures

Created: 31/Jul/06 01:01 PM   Updated: 13/Sep/06 01:14 PM   Resolved: 13/Sep/06 01:13 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1-alpha-1

Time Tracking:
Not Specified

Issue Links:
Duplicate
 
Related
 

Complexity: Intermediate


 Description  « Hide

We can hook into acegi authz event system to get unsuccessful logins and add the counter.

After a definer number (eg. 3) of unsucessful consecutive logins the account must be disabled.



Carlos Sanchez added a comment - 25/Aug/06 02:23 PM

From http://acegisecurity.org/faq.html

Common Problem #3: How do I disable a user after a number of failed logins?

A common user requirement is to disable / lock an account after a number of failed login attempts. Acegi itself does not provide anything "out of the box", however in your application you can implement and register an org.springframework.context.ApplicationListener. Inside your application event listener you can then check for an instanceof the particular AuthenticationFailureEvent and then call your application user management interface to update the user details.

For example:

public void onApplicationEvent(ApplicationEvent event) {

// check failed event
if(event instanceof AuthenticationFailurePasswordEvent){ // call user management interface to increment failed login attempts, etc. . . . }
}


Carlos Sanchez added a comment - 25/Aug/06 02:40 PM

We need to inject an ApplicationEventPublisher into ProviderManager that will process the AuthenticationFailurePasswordEvent as said before.

Actually seems that it's not AuthenticationFailurePasswordEvent but AuthenticationFailureBadCredentialsEvent. There's a long list of possible events that inherit from AbstractAuthenticationFailureEvent, http://acegisecurity.org/multiproject/acegi-security/apidocs/org/acegisecurity/event/authentication/AbstractAuthenticationFailureEvent.html


Joakim Erdfelt added a comment - 29/Aug/06 05:12 PM

Work has been completed on this.
Uber-patch has been submitted to Carlos Sanchez.


Carlos Sanchez added a comment - 29/Aug/06 06:59 PM

Applied patch from Joakim