Allow logging of failed login attempts

オープン 初心者向け
#1,218 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
65/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
rust

調査の方向性

ログイン試行が処理されるSQLPageのRustコードベース内の認証モジュールを見つけてください。ログインに失敗した場合のHTTPレスポンスを302から401に変更し、ログインに成功した場合は302を維持してください。ログイン成功と失敗の両方のシナリオをテストして、動作を確認してください。

索引モデルが issue の本文から書いたものです。

説明

enhancement

What are you building with SQLPage ?
I’ve currently built a shared calendar with SQLPage, but I really like the project and will use it some more in the future for other simple apps

What is your problem ? A description of the problem, not the solution you are proposing.
When using the auth module, all login attempts show up the same in the reverse proxy logs (302 HTTP code) whether they’re successful or not. Because of this, it’s not possible to monitor if there is suspicious activity on the login page, with a bad actor trying to bruteforce passwords for example

What are you currently doing ? Since your solution is not implemented in SQLPage currently, what are you doing instead ?
Instead, I’m monitoring if an IP address is hitting the page that handles an auth multiple times in an hour. Any login attempt hits this page once, but when a legitimate user sucessfully logs in, they won’t fave to hit it again because they stay logged in thanks to their session cookie. Multiple hits point towards failed login attempts

Describe the solution you'd like
I’d like for an option in the auth module to return a different HTTP code for a failed login attempt (typically 401) and a successful one (the current 302). This way, failed logins can be logged by the reverse proxy

Describe alternatives you've considered
I’ve tried manually setting the status code to 401 with the ad hoc module, but it didn’t work

主要言語
Rust
スター
2.6k
フォーク
175
平均マージ
14時間 16分
マージ済み PR(30日)
43

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sqlpage/SQLPage のほかの issue

sqlpage/SQLPage の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。