You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Failed to load Key Provider Factory during deployment
#38758
We’ve recently encountered an issue with our Keycloak deployment. Since we have a large number of realms and users, it sometimes takes a while to import all the realms during a new deployment. As a result, under certain circumstances, if Keycloak doesn’t find the KeyProviderFactory, it ends up creating fallback certificates—which we want to avoid. This leads to unnecessary fallback certificates being created for some realms.
I’ve identified the part of the code responsible for creating these fallback certificates and noticed that it returns null when the KeyProviderFactory is not found. I’m considering whether we could throw an exception instead of returning null to prevent the creation of fallback certificates, especially since this only occurs during the deployment process.
What could be the consequences and proposal in this case. Any suggestion would be appreciated. Thank you
The location of this
keycloak\services\src\main\java\org\keycloak\keys\DefaultKeyManager.java
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello,
We’ve recently encountered an issue with our Keycloak deployment. Since we have a large number of realms and users, it sometimes takes a while to import all the realms during a new deployment. As a result, under certain circumstances, if Keycloak doesn’t find the KeyProviderFactory, it ends up creating fallback certificates—which we want to avoid. This leads to unnecessary fallback certificates being created for some realms.
I’ve identified the part of the code responsible for creating these fallback certificates and noticed that it returns null when the KeyProviderFactory is not found. I’m considering whether we could throw an exception instead of returning null to prevent the creation of fallback certificates, especially since this only occurs during the deployment process.
What could be the consequences and proposal in this case. Any suggestion would be appreciated. Thank you
The location of this
keycloak\services\src\main\java\org\keycloak\keys\DefaultKeyManager.java
Below is the change I am planning to do

Version of Keycloak 21.1.2
All reactions