LoginAttackReport

攻撃性のあるログインを判定します。

Installation

Add this line to your application's Gemfile: 'devise' and 'paper_trail' is required

gem 'devise'
gem 'paper_trail'

gem 'login_attack_report'

And then execute:

$ bundle

Or install it yourself as:

$ gem install 

Configuring

/config/initializers/login_attack_report.rb

LoginAttackReport.setup do |config|
  # ログイン成功回数リミット
  config. = 200
  # ログイン失敗回数リミット
  config. = 50
end

Usage

モデル名をシンボルで渡すことで攻撃性のあるログインを判定します。

ログイン成功回数のlimitを超えたユーザを抽出します。 ※ 異常に多い場合、どこかでID/パスワードが漏れている、もしくはIDが共有されている可能性あり

    LoginAttackReport::LARVersion.(:User)

ログイン失敗回数のlimitを超えたユーザを抽出します。 ※ 異常に多い場合、リスト型攻撃を受けている可能性あり

    LoginAttackReport::LARVersion.(:User)

Contributing

  1. Fork it ( https://github.com/[my-github-username]/login_attack_report/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request