-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DefaultBruteForceProtector leverages a single thread to write success /failed events #28368
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
b9da037 to
1a13c04
Compare
|
@rmartinc Could you please review this PR? |
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.
Unreported flaky test detected, please review
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.organization.admin.OrganizationTest#testAttributesKeycloak CI - Store IT (mariadb) org.keycloak.testsuite.organization.admin.OrganizationTest#testAttributesKeycloak CI - Store IT (mssql) |
561ecc4 to
7d2cdcc
Compare
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.
Unreported flaky test detected, please review
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.organization.admin.OrganizationTest#testAttributesKeycloak CI - Store IT (mssql) org.keycloak.testsuite.organization.admin.OrganizationTest#testAttributesKeycloak CI - Store IT (mysql) |
mposolda
left a comment
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.
@douglaspalmer @rmartinc Agree that this version looks much simpler. Thanks for the update!
Added one comment inline.
services/src/main/java/org/keycloak/services/managers/DefaultBruteForceProtector.java
Outdated
Show resolved
Hide resolved
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.
Unreported flaky test detected, please review
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.organization.admin.OrganizationTest#testAttributesKeycloak CI - Store IT (mssql) org.keycloak.testsuite.organization.admin.OrganizationTest#testAttributesKeycloak CI - Store IT (mysql) |
rmartinc
left a comment
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.
Thanks @douglaspalmer! Just a minor comment.
...ispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/LoginFailureEntity.java
Outdated
Show resolved
Hide resolved
…/failed events Closes keycloak#14084 Signed-off-by: Douglas Palmer <[email protected]>
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.admin.IdentityProviderTest#testSamlImportWithAnyEncryptionMethodorg.keycloak.testsuite.admin.IdentityProviderTest#testSamlImportWithAnyEncryptionMethodKeycloak CI - Store IT (mariadb) org.keycloak.testsuite.admin.IdentityProviderTest#testSamlImportWithAnyEncryptionMethodKeycloak CI - Store IT (mssql) org.keycloak.testsuite.admin.IdentityProviderTest#testSamlImportWithAnyEncryptionMethodKeycloak CI - Store IT (mysql) org.keycloak.testsuite.admin.IdentityProviderTest#testSamlImportWithAnyEncryptionMethodKeycloak CI - Store IT (oracle) org.keycloak.testsuite.admin.IdentityProviderTest#testSamlImportWithAnyEncryptionMethodKeycloak CI - Store IT (postgres) |
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.
Unreported flaky test detected, please review
rmartinc
left a comment
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.
Thanks @douglaspalmer! Approving. I did a comment because there is a comment which I think it's outdated but it's a minor thing.
| // wait a minimum of seconds for type to process so that a hacker | ||
| // cannot flood with failed logins and overwhelm the queue and not have notBefore updated to block next requests | ||
| // todo failure HTTP responses should be queued via async HTTP | ||
| //event.latch.await(5, TimeUnit.SECONDS); |
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.
Maybe we should delete these comments. My feeling this was important in the past because maybe the success/failure was executed in the same thread and not off-thread like it is now. But this is a minor thing. Approving anyway.
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.
+1, but yeah, likely does not worth to wait even more for this PR just because of it.
Maybe we can delete during some next PR, which need to do any changes in brute-force protector.
Closes #14084