-
Notifications
You must be signed in to change notification settings - Fork 704
Login throttling should be per-user #3564
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
We try to login multiple times as one user, trigger the login throttling, and then switch to a second user and try to login again. This second user should be able to login despite the tricksy behavior of the first.
(once merged this should get backported into 0.8.0) |
Codecov Report
@@ Coverage Diff @@
## develop #3564 +/- ##
========================================
Coverage 85.12% 85.12%
========================================
Files 37 37
Lines 2367 2367
Branches 260 260
========================================
Hits 2015 2015
Misses 289 289
Partials 63 63
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@redshiftzero thanks for adding a regression test and providing a test plan, changes look good.
One thing I've discovered while doing manual testing of this PR: logins for invalid usernames are not throttled. This would allow an attacker to potentially enumerate journalist usernames. Given that it requires an ATHS token, I think the risk is quite small.
Very good point, marking as wip for a bit |
Actually, upon investigation, this is actually the case on |
And since in the |
(here's a regression test for that other bug for later)
|
[0.8.0] Backports #3564 (fix login throttling bug)
Status
Ready for review
Description of Changes
Fixes #3563.
Changes proposed in this pull request:
Testing
Deployment
To be deployed in
securedrop-app-code
deb package tomorrowChecklist
If you made changes to the server application code:
make ci-lint
) and tests (make -C securedrop test
) pass in the development containerIf you made non-trivial code changes: