0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Railsアプリケーションの脆弱性試験の際にdeviseでアカウントをロックしない方法

0
Posted at

やりたいこと

  • AppScanを使ってRailsアプリケーションの脆弱性をチェックしたい
  • ログイン周りの処理はdeviseを使って実装済み

発生した問題

  • AppScanでテストすると、セッション情報が無効ですと言われてテストが途中で止まる

原因

  • deviseのアカウントがロックされている
    • AppScanが大量に不正ログインを試みた結果と思われる

対策

  • deviseでアカウントをロックしない
  • :failed_attemptsから、:noneに変更する
  # ==> Configuration for :lockable
  # Defines which strategy will be used to lock an account.
  # :failed_attempts = Locks an account after a number of failed attempts to sign in.
  # :none            = No lock strategy. You should handle locking by yourself.
  # config.lock_strategy = :failed_attempts
  config.lock_strategy = :none
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?