diff --git a/docs/documentation/upgrading/topics/changes/changes-25_0_3.adoc b/docs/documentation/upgrading/topics/changes/changes-25_0_3.adoc new file mode 100644 index 00000000000..f7c81a038fd --- /dev/null +++ b/docs/documentation/upgrading/topics/changes/changes-25_0_3.adoc @@ -0,0 +1,10 @@ += Concurrent login requests are blocked by default when brute force is enabled + +If an attacker launched many login attempts in parallel then the attacker could have more guesses at a password than the brute force protection configuration permits. This was due to the brute force check occurring before the brute force protector has locked the user. To prevent this race the Brute Force Protector now rejects all login attempts that occur while another login is in progress in the same server. + +If, for whatever reason, the new feature wants to be disabled there is a startup factory option: + +[source,bash] +---- +bin/kc.[sh|bat] start --spi-brute-force-protector-default-brute-force-detector-allow-concurrent-requests=true +---- diff --git a/docs/documentation/upgrading/topics/changes/changes.adoc b/docs/documentation/upgrading/topics/changes/changes.adoc index b8a54a1c0d9..e0660ba1eca 100644 --- a/docs/documentation/upgrading/topics/changes/changes.adoc +++ b/docs/documentation/upgrading/topics/changes/changes.adoc @@ -5,6 +5,10 @@ include::changes-26_0_0.adoc[leveloffset=3] +=== Migrating to 25.0.3 + +include::changes-25_0_3.adoc[leveloffset=3] + === Migrating to 25.0.2 include::changes-25_0_2.adoc[leveloffset=3] diff --git a/services/src/main/java/org/keycloak/services/managers/DefaultBruteForceProtectorFactory.java b/services/src/main/java/org/keycloak/services/managers/DefaultBruteForceProtectorFactory.java index 53a8ad6d46e..daf5e80dec9 100755 --- a/services/src/main/java/org/keycloak/services/managers/DefaultBruteForceProtectorFactory.java +++ b/services/src/main/java/org/keycloak/services/managers/DefaultBruteForceProtectorFactory.java @@ -17,9 +17,12 @@ package org.keycloak.services.managers; +import java.util.List; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; +import org.keycloak.provider.ProviderConfigProperty; +import org.keycloak.provider.ProviderConfigurationBuilder; /** * @author Bill Burke @@ -55,4 +58,16 @@ public class DefaultBruteForceProtectorFactory implements BruteForceProtectorFac public String getId() { return "default-brute-force-detector"; } + + @Override + public List getConfigMetadata() { + return ProviderConfigurationBuilder.create() + .property() + .name("allowConcurrentRequests") + .type("boolean") + .helpText("If concurrent logins are allowed by the brute force protection.") + .defaultValue(false) + .add() + .build(); + } }