Help us understand the problem. What is going on with this article?

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

More than 1 year has passed since last update.

やりたいこと

  • 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
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away