[keycloak-dev] ProviderConfigProperty.defaultValue for LIST_TYPE

Marek Posolda mposolda at redhat.com
Mon Oct 17 03:48:07 EDT 2016


There is one strange thing for ProviderConfigProperties, which uses type 
LIST. For those, the "defaultValue" field doesn't really use 
defaultValue of particular field, but instead it contains list of 
available values to be selected in combobox for particular config property.

IMO this is not good because of:

* Field "defaultValue" is used for something, which is not really 
defaultValue. It's a bit confusing IMO. Note once we're adding supported 
UserStorage SPIs, then customers may need to add their own properties of 
type "List" . So this is not just Keycloak implementation detail, but 
it's exposed externally.

* It's not easily possible to set the actual defaultValue for list 
because field "defaultValue" is occupied by the list of available values.


How about adding new field like "availableValues" to 
ProviderConfigProperty and refactor existing impls to use this one instead?

Marek



More information about the keycloak-dev mailing list