Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to limit rate on login API #440

Closed
mod opened this issue May 2, 2018 · 7 comments
Closed

Ability to limit rate on login API #440

mod opened this issue May 2, 2018 · 7 comments

Comments

@mod
Copy link
Contributor

mod commented May 2, 2018

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.

@rxx
Copy link

rxx commented May 3, 2018

We need to add Rack::Attack middleware like peatio does.
It has good configuration https://github.com/kickstarter/rack-attack/wiki/Advanced-Configuration

@rxx
Copy link

rxx commented May 3, 2018

I don't like captcha solution. We should use recaptcha on frontend and limit api calls by Rack Attack

@mod
Copy link
Contributor Author

mod commented May 3, 2018

Agreed with you, please create an additional issue for adding Rack::Attack
but I think we need both.

@mod
Copy link
Contributor Author

mod commented May 29, 2018

why did you closed @calj

@mod mod reopened this May 29, 2018
@rxx
Copy link

rxx commented May 29, 2018

@mod it was implemented at #467 and closed with that request. It's just devise lockable

@rxx
Copy link

rxx commented May 29, 2018

@mod Request with Rack Attack is here https://github.com/rubykube/barong/pull/468

@rxx
Copy link

rxx commented Jun 28, 2018

Implemented at 1.8.22

@rxx rxx closed this as completed Jun 28, 2018
@rxx rxx added v1.8 and removed v1.9 labels Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants