Allow logging of failed login attempts

Đang mở Phù hợp với người mới
#1,218 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
65/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
authentication

Hướng nghiên cứu

Tìm mô-đun xác thực trong cơ sở mã Rust của SQLPage, nơi xử lý các lần thử đăng nhập. Thay đổi phản hồi HTTP cho các lần đăng nhập thất bại từ 302 thành 401, đồng thời giữ nguyên 302 cho các lần đăng nhập thành công. Xác minh hành vi bằng cách kiểm thử cả các tình huống đăng nhập thành công và thất bại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Rust
Star
2.6k
Fork
175
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
43

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của sqlpage/SQLPage

Tất cả issue của sqlpage/SQLPage

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.