Add generic function to retrieve config value with metadata (#15083)

`config.ResolveConfigParam` returns the value of a configuration for any
subsystem based on checking env, config store, and default value. Also returns info
about which config source returned the value.

This is useful to return info about config params overridden via env in the user
APIs. Currently implemented only for OpenID subsystem, but will be extended for
others subsequently.
This commit is contained in:
Aditya Manthramurthy
2022-06-17 11:39:21 -07:00
committed by GitHub
parent 98ddc3596c
commit 7f629df4d5
5 changed files with 237 additions and 80 deletions

View File

@@ -243,7 +243,7 @@ func TestKeycloakProviderInitialization(t *testing.T) {
testKvs.Set(Vendor, "keycloak")
testKvs.Set(KeyCloakRealm, "TestRealm")
testKvs.Set(KeyCloakAdminURL, "http://keycloak.test/auth/admin")
cfgGet := func(env, param string) string {
cfgGet := func(param string) string {
return testKvs.Get(param)
}