Skip to content

Conversation

@arthanson
Copy link
Collaborator

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).

@jeremystretch
Copy link
Member

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?

@jeremystretch
Copy link
Member

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.)

@arthanson
Copy link
Collaborator Author

Changed to use the user_login_failed signal issued from within Django.

@arthanson
Copy link
Collaborator Author

@jeremystretch ready for re-review.

@jeremystretch
Copy link
Member

Changed to use the user_login_failed signal issued from within Django.

Nice!

arthanson and others added 2 commits November 17, 2022 16:46
Co-authored-by: Jeremy Stretch <[email protected]>
Co-authored-by: Jeremy Stretch <[email protected]>
@jeremystretch jeremystretch merged commit de9646d into develop Nov 18, 2022
@jeremystretch jeremystretch deleted the 10653-log-failed-logins branch November 18, 2022 13:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make it possible to log failed login attempts

3 participants