Closed mod closed 6 years ago
We need to add Rack::Attack middleware
like peatio does.
It has good configuration https://github.com/kickstarter/rack-attack/wiki/Advanced-Configuration
I don't like captcha solution. We should use recaptcha on frontend and limit api calls by Rack Attack
Agreed with you, please create an additional issue for adding Rack::Attack but I think we need both.
why did you closed @calj
@mod it was implemented at #467 and closed with that request. It's just devise lockable
@mod Request with Rack Attack is here https://github.com/rubykube/barong/pull/468
Implemented at 1.8.22
Ability to limit rate on login API
A malicious user tries to brute-force the login form and login API using thousands of requests.
Implementation suggestion
Study the optional Capcha on login: https://github.com/rubykube/barong/issues/356
We can count Failed login attempts, and last fail login attempts time.
disregarding IP and cookies, this is a mysql based counter that will increment for each consecutive login failed, but reset on first successful login.
After 5 failed login attempts we will reject any login attempt during 10 minutes.
if after 10 minutes login was successful failed login attempted is reset.