Reputation: 461
I am working on a application where at some places I need to introduce captcha if N number of attempts failed. These places can be signup, login, add to wishlist, subscribe etc. It is also to ensure that denial of service attack and brute force attack cannot be attempted by anyone. Is there a mechanism for this in Spring Security?
Upvotes: 8
Views: 5351
Reputation: 3084
If you are using reCAPTCHA with Spring Security, this is helpful http://krams915.blogspot.com/2011/02/spring-security-3-integrating-recaptcha.html
Upvotes: 0
Reputation: 24040
Implement an AuthenticationFailureHandler that updates a count/time in the DB. You can't count on using the session because the attacker is not going to be sending cookies anyway.
Upvotes: 7
Reputation: 6241
Implementation done using JCaptcha and SpringMVC
http://parasjain.net/2008/11/11/jcaptcha-with-spring/
Upvotes: 2
Reputation: 17525
There is nothing in Spring Security directly, but it should be easy to store the login count in the users session and check that count in your JSP to render a CAPTCHA is neccessary.
Upvotes: 9