[keycloak-dev] Provider's "disabled" and "enabled" flags

Sebastian Laskawiec slaskawi at redhat.com
Tue Aug 27 08:29:41 EDT 2019


Hey,

As Stefan noticed, some providers (including the one I created a few weeks
back) check "disabled" flag from the configuration [1][2]. Stefan pointed
out, that our Subsystem (and Keycloak internals) already check the
"enabled" flag [3] on the SPI level. If the SPI is disabled, it won't be
initialized at all, so all the disabled/enabled checks in
ProviderFactory#init seems to be redundant.

If I didn't miss anything and you all agree with me, I'd like to remove
this kind of checks.

Thanks,
Sebastian

[1]
https://github.com/keycloak/keycloak/blob/5f9feee3f86e3d856063c8b6d355e30c962258f7/services/src/main/java/org/keycloak/truststore/FileTruststoreProviderFactory.java#L66
[2]
https://github.com/keycloak/keycloak/blob/3afbdd3ea3d8eb1ef339f2c0c46fb57783f4b79b/services/src/main/java/org/keycloak/vault/PlainTextVaultProviderFactory.java#L41
[3]
https://github.com/keycloak/keycloak/blob/505cf5b25184c59ca85de63b082eb12383eba1ab/services/src/main/java/org/keycloak/services/DefaultKeycloakSessionFactory.java#L272


More information about the keycloak-dev mailing list