-
Notifications
You must be signed in to change notification settings - Fork 2.9k
10653 log failed login attempts on INFO #10843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Let's keep the debug line as it is, I think. I would think it's already possible to log authentication failures reported by Django using the native logging functionality; is this not the case? |
|
I did a bit of digging and surprisingly it seems that Django doesn't log authentication failures out of the box. Still, we'd want to log the success/failure result somewhere closer to the backend itself, rather than on the login form. (The exists logging statements are merely for debugging the form itself.) |
|
Changed to use the user_login_failed signal issued from within Django. |
|
@jeremystretch ready for re-review. |
Nice! |
Co-authored-by: Jeremy Stretch <[email protected]>
Co-authored-by: Jeremy Stretch <[email protected]>
Fixes: #10653
@jeremystretch Not completely sure of what is the best way here. The log was done for failed login attempts but at DEBUG level which would be fairly spammy to have on, changed to INFO level also included failed username - I don't think that would violate personal-identifiable-information security issues... Probably up for discussion if this makes sense to change (from a logging standpoint if that is too much info for some people, and security if the username should be shown).