From e73c6103cfc25c2a4eb3f04c844d527ae73e3c68 Mon Sep 17 00:00:00 2001 From: Sam Dammers Date: Wed, 28 Apr 2021 14:41:40 +1000 Subject: [PATCH] KEYCLOAK-17888 This reverts [KEYCLOAK-14299] - Do not create keys during startup but on-demand Restoring the original realm key provisioning process due to undesirable behaviour when using on demand provisoning under load (duplicate keys created). --- .../java/org/keycloak/services/managers/ApplianceBootstrap.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/src/main/java/org/keycloak/services/managers/ApplianceBootstrap.java b/services/src/main/java/org/keycloak/services/managers/ApplianceBootstrap.java index 477ae1bb13..90009a2966 100755 --- a/services/src/main/java/org/keycloak/services/managers/ApplianceBootstrap.java +++ b/services/src/main/java/org/keycloak/services/managers/ApplianceBootstrap.java @@ -26,6 +26,7 @@ import org.keycloak.models.RealmModel; import org.keycloak.models.RoleModel; import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserModel; +import org.keycloak.models.utils.DefaultKeyProviders; import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.services.ServicesLogger; @@ -86,6 +87,7 @@ public class ApplianceBootstrap { realm.setRegistrationEmailAsUsername(false); session.getContext().setRealm(realm); + DefaultKeyProviders.createProviders(realm); return true; }