From bc901d00258a1ac20607ce57cb43298a49e7baa9 Mon Sep 17 00:00:00 2001 From: Pedro Igor Date: Tue, 26 May 2020 10:33:45 -0300 Subject: [PATCH] [KEYCLOAK-14299] - Do not create keys during startup but on-demand --- services/src/main/java/org/keycloak/keys/DefaultKeyManager.java | 2 +- .../java/org/keycloak/services/managers/ApplianceBootstrap.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/services/src/main/java/org/keycloak/keys/DefaultKeyManager.java b/services/src/main/java/org/keycloak/keys/DefaultKeyManager.java index 0e04165301..98f846e7b4 100644 --- a/services/src/main/java/org/keycloak/keys/DefaultKeyManager.java +++ b/services/src/main/java/org/keycloak/keys/DefaultKeyManager.java @@ -67,7 +67,7 @@ public class DefaultKeyManager implements KeyManager { List providers = getProviders(realm); activeKey = getActiveKey(providers, realm, use, algorithm); if (activeKey != null) { - logger.warnv("Fallback key created: realm={0} algorithm={1} use={2}", realm.getName(), algorithm, use.name()); + logger.infov("No keys found for realm={0} and algorithm={1} for use={2}. Generating keys.", realm.getName(), algorithm, use.name()); return activeKey; } else { break; 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 4c62efcab2..c5943ae1b8 100755 --- a/services/src/main/java/org/keycloak/services/managers/ApplianceBootstrap.java +++ b/services/src/main/java/org/keycloak/services/managers/ApplianceBootstrap.java @@ -86,7 +86,6 @@ public class ApplianceBootstrap { realm.setRegistrationEmailAsUsername(false); session.getContext().setRealm(realm); - DefaultKeyProviders.createProviders(realm); return true; }