Allow logging of failed login attempts

Aperta Adatta ai principianti
#1,218 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
65/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
rust

Direzione di ricerca

Individua il modulo di autenticazione nella codebase Rust di SQLPage in cui vengono elaborati i tentativi di accesso. Modifica la risposta HTTP per i tentativi di accesso non riusciti da 302 a 401, mantenendo 302 per gli accessi riusciti. Verifica il comportamento testando sia scenari di accesso riuscito sia non riuscito.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Rust
Stelle
2.6k
Fork
175
Merge medio
14h 16m
PR unite (30g)
43

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sqlpage/SQLPage

Tutte le issue di sqlpage/SQLPage

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.